1 dnl Process this file with autoconf to produce a configure script.
5 export PACKAGE=swftools
6 export VERSION=pre0.1.0
8 export CFLAGS="-O2 -fomit-frame-pointer"
9 export CXXFLAGS="-O2 -fomit-frame-pointer"
11 dnl Checks for programs.
21 dnl Checks for system services
24 dnl Checks for libraries.
26 echo "Error: Math library not found.";
29 AC_CHECK_LIB(z, deflate,,
30 echo "Error: The zlib compression library is required."
32 MISSINGLIBS="${MISSINGLIBS} zlib"
34 AC_CHECK_LIB(jpeg, jpeg_write_raw_data,,
37 MISSINGLIBS="${MISSINGLIBS} jpeglib"
39 AC_CHECK_LIB(t1, T1_LoadFont,,
41 MISSINGLIBS="${MISSINGLIBS} T1lib"
45 dnl AC_CHECK_LIB(pthread, pthread_create)
46 dnl AC_CHECK_LIB(X11, XFlush)
48 dnl Checks for header files.
49 AC_CONFIG_HEADER(config.h)
54 AC_CHECK_HEADERS(math.h fcntl.h limits.h malloc.h unistd.h memory.h zlib.h jpeglib.h t1lib.h sys/stat.h)
56 if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
59 MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
61 if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
63 MISSINGLIBS="${MISSINGLIBS} t1lib.h"
65 if test "x${ac_cv_header_zlib_h}" != "xyes"; then
67 MISSINGLIBS="${MISSINGLIBS} zlib.h"
70 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
71 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
75 AC_SUBST(HAVE_UNISTD_H)
78 dnl Checks for typedefs, structures, and compiler characteristics.
84 dnl AC_CHECK_TYPE(uchar,unsigned char)
85 dnl AC_CHECK_TYPE(schar,signed char)
86 dnl AC_CHECK_TYPE(word,unsigned short int)
87 dnl AC_CHECK_TYPE(sword,unsigned short int)
88 dnl AC_CHECK_TYPE(uint,unsigned long int)
90 dnl Checks for library functions.
94 AC_CHECK_FUNCS(getcwd putenv socket strcspn strdup strerror strstr)
96 export JPEG2SWF='jpeg2swf$(EXEEXT)'
97 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
98 echo "***************************************************"
99 echo "The following headers/libraries are missing: " ${MISSINGLIBS}
100 echo "Disabling pdf2swf tool..."
101 rm -f pdf2swf/Makefile
102 echo all: > pdf2swf/Makefile
103 echo install: >> pdf2swf/Makefile
104 if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
105 echo "Disabling jpeg2swf tool..."
108 echo "***************************************************"
109 FILES="./release Makefile lib/Makefile src/Makefile"
111 FILES="./release Makefile lib/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/fonts/Makefile"