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.
18 AC_CHECK_PROGS(UNCOMPRESS, gzip uncompress compress, )
20 dnl Checks for system services
23 dnl Checks for libraries.
25 echo "Error: Math library not found.";
28 AC_CHECK_LIB(z, deflate,,
29 echo "Error: The zlib compression library is required."
31 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 AC_SUBST(WORDS_BIGENDIAN)
46 SWF_CHECK_SYSTEM_BACKTICKS
47 AC_SUBST(SYSTEM_BACKTICKS)
52 dnl AC_CHECK_LIB(pthread, pthread_create)
53 dnl AC_CHECK_LIB(X11, XFlush)
55 dnl Checks for header files.
56 AC_CONFIG_HEADER(config.h)
61 AC_CHECK_HEADERS(zlib.h jpeglib.h t1lib.h sys/stat.h sys/types.h dirent.h sys/ndir.h sys/dir.h ndir.h)
63 if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
66 MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
68 if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
70 MISSINGLIBS="${MISSINGLIBS} t1lib.h"
72 if test "x${ac_cv_header_zlib_h}" != "xyes"; then
74 MISSINGLIBS="${MISSINGLIBS} zlib.h"
77 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
78 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
82 AC_SUBST(HAVE_UNISTD_H)
85 dnl Checks for typedefs, structures, and compiler characteristics.
91 AC_CHECK_TYPE(boolean,int)
92 AC_CHECK_TYPE(bool,char)
93 dnl AC_CHECK_TYPE(uchar,unsigned char)
94 dnl AC_CHECK_TYPE(schar,signed char)
95 dnl AC_CHECK_TYPE(word,unsigned short int)
96 dnl AC_CHECK_TYPE(sword,unsigned short int)
97 dnl AC_CHECK_TYPE(uint,unsigned long int)
99 dnl Checks for library functions.
100 AC_CHECK_FUNCS(popen mkstemp stat lrand48 rand srand48 srand)
103 avi2swf="avi2swf/Makefile"
104 if test "x${AVIFILE}" != "xtrue"; then
105 echo "* Couldn't compile the avifile test program."
106 echo "* Disabling avi2swf tool..."
107 echo all: > avi2swf/Makefile
108 echo install: >> avi2swf/Makefile
109 echo clean: >> avi2swf/Makefile
113 if test "x${UNCOMPRESS}" = "xgzip"; then
114 AC_DEFINE_UNQUOTED(USE_GZIP, 1)
118 JPEG2SWF='jpeg2swf$(EXEEXT)'
120 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
121 echo "***************************************************"
122 echo "The following headers/libraries are missing: " ${MISSINGLIBS}
123 echo "Disabling pdf2swf tool..."
124 rm -f pdf2swf/Makefile
125 echo all: > pdf2swf/Makefile
126 echo install: >> pdf2swf/Makefile
127 echo clean: >> pdf2swf/Makefile
128 if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
129 echo "Disabling jpeg2swf tool..."
133 echo "***************************************************"
134 FILES="./release ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile swfs/Makefile"
136 FILES="./release ${avi2swf} Makefile lib/lame/Makefile lib/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/ttf2pt1/Makefile pdf2swf/fonts/Makefile swfs/Makefile"