1 dnl Process this file with autoconf to produce a configure script.
6 CFLAGS="-Winline -Wparentheses -Wimplicit -Wreturn-type -O2 -fomit-frame-pointer"
7 CXXFLAGS="-Winline -Wparentheses -Wimplicit -Wreturn-type -O2 -fomit-frame-pointer"
8 export PACKAGE VERSION CFLAGS CXXFLAGS
10 dnl Checks for programs.
19 AC_CHECK_PROGS(UNCOMPRESS, gzip uncompress compress, )
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"
35 AC_CHECK_LIB(jpeg, jpeg_write_raw_data,,
38 MISSINGLIBS="${MISSINGLIBS} jpeglib"
40 AC_CHECK_LIB(t1, T1_LoadFont,,
42 MISSINGLIBS="${MISSINGLIBS} T1lib"
46 AC_SUBST(WORDS_BIGENDIAN)
47 SWF_CHECK_SYSTEM_BACKTICKS
48 AC_SUBST(SYSTEM_BACKTICKS)
53 dnl AC_CHECK_LIB(pthread, pthread_create)
54 dnl AC_CHECK_LIB(X11, XFlush)
56 dnl Checks for header files.
57 AC_CONFIG_HEADER(config.h)
62 AC_CHECK_HEADERS(zlib.h jpeglib.h t1lib.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h)
64 if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
67 MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
69 if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
71 MISSINGLIBS="${MISSINGLIBS} t1lib.h"
73 if test "x${ac_cv_header_zlib_h}" != "xyes"; then
75 MISSINGLIBS="${MISSINGLIBS} zlib.h"
78 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
79 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
83 AC_SUBST(HAVE_UNISTD_H)
86 dnl Checks for typedefs, structures, and compiler characteristics.
92 AC_CHECK_TYPE(boolean,int)
93 AC_CHECK_TYPE(bool,char)
94 dnl AC_CHECK_TYPE(uchar,unsigned char)
95 dnl AC_CHECK_TYPE(schar,signed char)
96 dnl AC_CHECK_TYPE(word,unsigned short int)
97 dnl AC_CHECK_TYPE(sword,unsigned short int)
98 dnl AC_CHECK_TYPE(uint,unsigned long int)
100 dnl Checks for library functions.
101 AC_CHECK_FUNCS(popen mkstemp stat lrand48 rand srand48 srand)
104 avi2swf="avi2swf/Makefile"
105 if test "x${AVIFILE}" != "xtrue"; then
106 echo "* Couldn't compile the avifile test program."
107 echo "* Disabling avi2swf tool..."
108 echo all: > avi2swf/Makefile
109 echo install: >> avi2swf/Makefile
110 echo clean: >> avi2swf/Makefile
114 if test "x${UNCOMPRESS}" = "xgzip"; then
115 AC_DEFINE_UNQUOTED(USE_GZIP, 1)
119 JPEG2SWF='jpeg2swf$(EXEEXT)'
121 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
122 echo "***************************************************"
123 echo "The following headers/libraries are missing: " ${MISSINGLIBS}
124 echo "Disabling pdf2swf tool..."
125 rm -f pdf2swf/Makefile
126 echo all: > pdf2swf/Makefile
127 echo install: >> pdf2swf/Makefile
128 echo clean: >> pdf2swf/Makefile
129 if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
130 echo "Disabling jpeg2swf tool..."
134 echo "***************************************************"
135 FILES="./release ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile swfs/Makefile"
137 FILES="./release ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/ttf2pt1/Makefile pdf2swf/fonts/Makefile swfs/Makefile"