X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=configure;h=89c2c7b884ca65f89a85fbe72a43a45dba04bf98;hp=7644451e1543440ab731bc90aa971cdbd43901fb;hb=f7e9e8a9616f1ecb26776369fda6807cf8821a68;hpb=30dac8edbe38bcdaa0644f73595e01aa4e4c4857 diff --git a/configure b/configure index 7644451..89c2c7b 100755 --- a/configure +++ b/configure @@ -694,7 +694,11 @@ PACKAGE VERSION HAVE_UNISTD_H FREETYPE_CONFIG -lame_objects +DEVICE_OPENGL +lame_in_source +art_in_source +xpdf_in_source +splash_in_source AVIFILE_CONFIG VIDEO_LIBS VIDEO_CFLAGS @@ -1307,6 +1311,11 @@ Optional Features: --enable-optimizations turn on compiler optimizations (recommended for avi2swf) --disable-lame don't compile any L.A.M.E. mp3 encoding code in +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-poppler use poppler instead of internal xpdf (currently broken) + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -1774,8 +1783,14 @@ if test "${enable_lame+set}" = set; then fi +# Check whether --with-poppler was given. +if test "${with_poppler+set}" = set; then + withval=$with_poppler; USE_POPPLER=true +fi + + PACKAGE=swftools -VERSION=2008-03-26-1351 +VERSION=0.9.0 # ------------------------------------------------------------------ @@ -1952,6 +1967,10 @@ case $host_os in CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS -fno-rtti" SHARED="-bundle" + if test -d /opt/local/include && test -d /opt/local/lib; then + CPPFLAGS="${CPPFLAGS} -I/opt/local/include" + LDFLAGS="${LDFLAGS} -L/opt/local/lib" + fi # Use fink packages if available. #if test -d /sw/include && test -d /sw/lib; then # CPPFLAGS="${CPPFLAGS} -I/sw/include" @@ -3284,7 +3303,7 @@ if test "x$GCC_IS_OK" '=' "x";then echo "***************************************************" echo "* Your gcc is too old to compile this!" echo "* " - echo "* The last version compilable by this compiler is " + echo "* The last version compileable by this compiler is " echo "* swftools 0.7.0, which you can download from " echo "* http://www.swftools.org/swftools-0.7.0.tar.gz " echo "* ." @@ -3793,6 +3812,7 @@ fi done + OBJEXT="o" AREXT=".a" CXXLIBS="-lstdc++" @@ -3880,7 +3900,8 @@ fi if test "x${CYGWIN}" = "xyes"; then - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define CYGWIN 1 _ACEOF @@ -3888,12 +3909,14 @@ _ACEOF echo "${ECHO_T}cygwin" >&6; } else if test "x${MINGW}" = "xyes"; then - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define MINGW 1 _ACEOF WIN32=1 - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define WIN32 1 _ACEOF @@ -3903,7 +3926,8 @@ echo "${ECHO_T}mingw" >&6; } else LINUX=1 export LINUX - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define LINUX 1 _ACEOF @@ -3916,7 +3940,8 @@ fi SLEXT="so" if test "x${MINGW}" != "xyes"; then # no mingW - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define O_BINARY 0 _ACEOF @@ -4469,7 +4494,8 @@ echo "${ECHO_T}big endian" >&6; } BYTEORDERCHECKOK=1 WORDS_BIGENDIAN=1 export WORDS_BIGENDIAN -cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF @@ -4547,7 +4573,8 @@ rm -f config.tmp2 echo "${ECHO_T}yes" >&6; } SYSTEM_BACKTICKS=1 export SYSTEM_BACKTICKS -cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define SYSTEM_BACKTICKS 1 _ACEOF @@ -5152,6 +5179,7 @@ _ACEOF fi + # On IRIX 5.3, sys/types and inttypes.h are conflicting. @@ -5236,7 +5264,11 @@ done -for ac_header in zlib.h gif_lib.h io.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h + + + + +for ac_header in zlib.h gif_lib.h io.h wchar.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/mman.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h sys/time.h sys/resource.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -5376,10 +5408,12 @@ fi done + cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF + cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF @@ -5825,7 +5859,12 @@ fi -for ac_func in popen mkstemp stat lrand48 rand srand48 srand bcopy bzero time + + + + + +for ac_func in popen wcschr wcsdup mkstemp stat mmap lrand48 rand srand48 srand bcopy bzero time getrusage mallinfo do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -5919,9 +5958,9 @@ fi done -{ echo "$as_me:$LINENO: checking for signed" >&5 -echo $ECHO_N "checking for signed... $ECHO_C" >&6; } -if test "${ac_cv_type_signed+set}" = set; then +{ echo "$as_me:$LINENO: checking for signed char" >&5 +echo $ECHO_N "checking for signed char... $ECHO_C" >&6; } +if test "${ac_cv_type_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5931,7 +5970,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef signed ac__type_new_; +typedef signed char ac__type_new_; int main () { @@ -5960,26 +5999,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_signed=yes + ac_cv_type_signed_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signed=no + ac_cv_type_signed_char=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signed" >&5 -echo "${ECHO_T}$ac_cv_type_signed" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_signed_char" >&5 +echo "${ECHO_T}$ac_cv_type_signed_char" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of signed" >&5 -echo $ECHO_N "checking size of signed... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_signed+set}" = set; then +{ echo "$as_me:$LINENO: checking size of signed char" >&5 +echo $ECHO_N "checking size of signed char... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_signed_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -5991,7 +6030,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; int main () { @@ -6028,7 +6067,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; int main () { @@ -6082,7 +6121,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; int main () { @@ -6119,7 +6158,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; int main () { @@ -6183,7 +6222,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; int main () { @@ -6222,15 +6261,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_signed=$ac_lo;; -'') if test "$ac_cv_type_signed" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed) +?*) ac_cv_sizeof_signed_char=$ac_lo;; +'') if test "$ac_cv_type_signed_char" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed) +echo "$as_me: error: cannot compute sizeof (signed char) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed=0 + ac_cv_sizeof_signed_char=0 fi ;; esac else @@ -6241,7 +6280,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed ac__type_sizeof_; + typedef signed char ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -6293,40 +6332,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_signed=`cat conftest.val` + ac_cv_sizeof_signed_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_signed" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed) +if test "$ac_cv_type_signed_char" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed char) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed) +echo "$as_me: error: cannot compute sizeof (signed char) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed=0 + ac_cv_sizeof_signed_char=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed" >&5 -echo "${ECHO_T}$ac_cv_sizeof_signed" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_char" >&5 +echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIGNED $ac_cv_sizeof_signed +#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char _ACEOF -{ echo "$as_me:$LINENO: checking for unsigned" >&5 -echo $ECHO_N "checking for unsigned... $ECHO_C" >&6; } -if test "${ac_cv_type_unsigned+set}" = set; then +{ echo "$as_me:$LINENO: checking for signed short" >&5 +echo $ECHO_N "checking for signed short... $ECHO_C" >&6; } +if test "${ac_cv_type_signed_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -6336,7 +6375,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef unsigned ac__type_new_; +typedef signed short ac__type_new_; int main () { @@ -6365,26 +6404,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_unsigned=yes + ac_cv_type_signed_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_unsigned=no + ac_cv_type_signed_short=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_signed_short" >&5 +echo "${ECHO_T}$ac_cv_type_signed_short" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of unsigned" >&5 -echo $ECHO_N "checking size of unsigned... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_unsigned+set}" = set; then +{ echo "$as_me:$LINENO: checking size of signed short" >&5 +echo $ECHO_N "checking size of signed short... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_signed_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -6396,7 +6435,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; int main () { @@ -6433,7 +6472,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; int main () { @@ -6487,7 +6526,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; int main () { @@ -6524,7 +6563,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; int main () { @@ -6588,7 +6627,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; int main () { @@ -6627,15 +6666,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_unsigned=$ac_lo;; -'') if test "$ac_cv_type_unsigned" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned) +?*) ac_cv_sizeof_signed_short=$ac_lo;; +'') if test "$ac_cv_type_signed_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned) +echo "$as_me: error: cannot compute sizeof (signed short) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_unsigned=0 + ac_cv_sizeof_signed_short=0 fi ;; esac else @@ -6646,7 +6685,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned ac__type_sizeof_; + typedef signed short ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -6698,40 +6737,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_unsigned=`cat conftest.val` + ac_cv_sizeof_signed_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_unsigned" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned) +if test "$ac_cv_type_signed_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned) +echo "$as_me: error: cannot compute sizeof (signed short) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_unsigned=0 + ac_cv_sizeof_signed_short=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned" >&5 -echo "${ECHO_T}$ac_cv_sizeof_unsigned" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_signed_short" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned +#define SIZEOF_SIGNED_SHORT $ac_cv_sizeof_signed_short _ACEOF -{ echo "$as_me:$LINENO: checking for signed long" >&5 -echo $ECHO_N "checking for signed long... $ECHO_C" >&6; } -if test "${ac_cv_type_signed_long+set}" = set; then +{ echo "$as_me:$LINENO: checking for signed" >&5 +echo $ECHO_N "checking for signed... $ECHO_C" >&6; } +if test "${ac_cv_type_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -6741,7 +6780,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef signed long ac__type_new_; +typedef signed ac__type_new_; int main () { @@ -6770,26 +6809,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_signed_long=yes + ac_cv_type_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signed_long=no + ac_cv_type_signed=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signed_long" >&5 -echo "${ECHO_T}$ac_cv_type_signed_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_signed" >&5 +echo "${ECHO_T}$ac_cv_type_signed" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of signed long" >&5 -echo $ECHO_N "checking size of signed long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_signed_long+set}" = set; then +{ echo "$as_me:$LINENO: checking size of signed" >&5 +echo $ECHO_N "checking size of signed... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -6801,7 +6840,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; int main () { @@ -6838,7 +6877,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; int main () { @@ -6892,7 +6931,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; int main () { @@ -6929,7 +6968,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; int main () { @@ -6993,7 +7032,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; int main () { @@ -7032,15 +7071,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_signed_long=$ac_lo;; -'') if test "$ac_cv_type_signed_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long) +?*) ac_cv_sizeof_signed=$ac_lo;; +'') if test "$ac_cv_type_signed" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed long) +echo "$as_me: error: cannot compute sizeof (signed) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed_long=0 + ac_cv_sizeof_signed=0 fi ;; esac else @@ -7051,7 +7090,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long ac__type_sizeof_; + typedef signed ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -7103,40 +7142,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_signed_long=`cat conftest.val` + ac_cv_sizeof_signed=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_signed_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long) +if test "$ac_cv_type_signed" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed long) +echo "$as_me: error: cannot compute sizeof (signed) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed_long=0 + ac_cv_sizeof_signed=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_signed_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed" >&5 +echo "${ECHO_T}$ac_cv_sizeof_signed" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIGNED_LONG $ac_cv_sizeof_signed_long +#define SIZEOF_SIGNED $ac_cv_sizeof_signed _ACEOF -{ echo "$as_me:$LINENO: checking for unsigned long" >&5 -echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; } -if test "${ac_cv_type_unsigned_long+set}" = set; then +{ echo "$as_me:$LINENO: checking for signed long long" >&5 +echo $ECHO_N "checking for signed long long... $ECHO_C" >&6; } +if test "${ac_cv_type_signed_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7146,7 +7185,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef unsigned long ac__type_new_; +typedef signed long long ac__type_new_; int main () { @@ -7175,26 +7214,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_unsigned_long=yes + ac_cv_type_signed_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_unsigned_long=no + ac_cv_type_signed_long_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_signed_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_signed_long_long" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of unsigned long" >&5 -echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then +{ echo "$as_me:$LINENO: checking size of signed long long" >&5 +echo $ECHO_N "checking size of signed long long... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_signed_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -7206,7 +7245,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; int main () { @@ -7243,7 +7282,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; int main () { @@ -7297,7 +7336,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; int main () { @@ -7334,7 +7373,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; int main () { @@ -7398,7 +7437,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; int main () { @@ -7437,15 +7476,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_unsigned_long=$ac_lo;; -'') if test "$ac_cv_type_unsigned_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +?*) ac_cv_sizeof_signed_long_long=$ac_lo;; +'') if test "$ac_cv_type_signed_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned long) +echo "$as_me: error: cannot compute sizeof (signed long long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_unsigned_long=0 + ac_cv_sizeof_signed_long_long=0 fi ;; esac else @@ -7456,7 +7495,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long ac__type_sizeof_; + typedef signed long long ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -7508,40 +7547,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_unsigned_long=`cat conftest.val` + ac_cv_sizeof_signed_long_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_unsigned_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +if test "$ac_cv_type_signed_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned long) +echo "$as_me: error: cannot compute sizeof (signed long long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_unsigned_long=0 + ac_cv_sizeof_signed_long_long=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_signed_long_long" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +#define SIZEOF_SIGNED_LONG_LONG $ac_cv_sizeof_signed_long_long _ACEOF -{ echo "$as_me:$LINENO: checking for signed long long" >&5 -echo $ECHO_N "checking for signed long long... $ECHO_C" >&6; } -if test "${ac_cv_type_signed_long_long+set}" = set; then +{ echo "$as_me:$LINENO: checking for void*" >&5 +echo $ECHO_N "checking for void*... $ECHO_C" >&6; } +if test "${ac_cv_type_voidp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7551,7 +7590,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef signed long long ac__type_new_; +typedef void* ac__type_new_; int main () { @@ -7580,26 +7619,26 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_signed_long_long=yes + ac_cv_type_voidp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signed_long_long=no + ac_cv_type_voidp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signed_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_signed_long_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_voidp" >&5 +echo "${ECHO_T}$ac_cv_type_voidp" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of signed long long" >&5 -echo $ECHO_N "checking size of signed long long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_signed_long_long+set}" = set; then +{ echo "$as_me:$LINENO: checking size of void*" >&5 +echo $ECHO_N "checking size of void*... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_voidp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then @@ -7611,7 +7650,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; int main () { @@ -7648,7 +7687,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; int main () { @@ -7702,7 +7741,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; int main () { @@ -7739,7 +7778,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; int main () { @@ -7803,7 +7842,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; int main () { @@ -7842,15 +7881,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_signed_long_long=$ac_lo;; -'') if test "$ac_cv_type_signed_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long long) +?*) ac_cv_sizeof_voidp=$ac_lo;; +'') if test "$ac_cv_type_voidp" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed long long) +echo "$as_me: error: cannot compute sizeof (void*) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed_long_long=0 + ac_cv_sizeof_voidp=0 fi ;; esac else @@ -7861,7 +7900,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef signed long long ac__type_sizeof_; + typedef void* ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include @@ -7913,69 +7952,135 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_signed_long_long=`cat conftest.val` + ac_cv_sizeof_voidp=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_signed_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (signed long long) +if test "$ac_cv_type_voidp" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void*) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (signed long long) +echo "$as_me: error: cannot compute sizeof (void*) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else - ac_cv_sizeof_signed_long_long=0 + ac_cv_sizeof_voidp=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_signed_long_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_voidp" >&5 +echo "${ECHO_T}$ac_cv_sizeof_voidp" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIGNED_LONG_LONG $ac_cv_sizeof_signed_long_long +#define SIZEOF_VOIDP $ac_cv_sizeof_voidp _ACEOF -{ echo "$as_me:$LINENO: checking for unsigned long long" >&5 -echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; } -if test "${ac_cv_type_unsigned_long_long+set}" = set; then + + + +# Extract the first word of "freetype-config", so it can be a program name with args. +set dummy freetype-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + case $FREETYPE_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""$PATH:/usr/local/bin:/sw/bin:/opt/local/bin"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG +if test -n "$FREETYPE_CONFIG"; then + { echo "$as_me:$LINENO: result: $FREETYPE_CONFIG" >&5 +echo "${ECHO_T}$FREETYPE_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +OLDCPPFLAGS="${CPPFLAGS}" +OLDLIBS="${LIBS}" +if test "x${FREETYPE_CONFIG}" '!=' "x"; then + CPPFLAGS="$CPPFLAGS "`$FREETYPE_CONFIG --cflags` +else if test -d /usr/include/freetype2; then + CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2" +else if test -d /usr/local/include/freetype2; then + CPPFLAGS="$CPPFLAGS -I/usr/local/include/freetype2" +fi +fi +fi + +if test "x${FREETYPE_CONFIG}" '=' "x";then + # if we didn't find the freetype-config program, we won't + # know where the libs are expected to be. So just blindly + # try to link against them. + { echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5 +echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6; } +if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfreetype $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef unsigned long long ac__type_new_; + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char FT_Init_FreeType (); int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +return FT_Init_FreeType (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -7984,31 +8089,45 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_unsigned_long_long=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_freetype_FT_Init_FreeType=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_unsigned_long_long=no + ac_cv_lib_freetype_FT_Init_FreeType=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; } - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of unsigned long long" >&5 -echo $ECHO_N "checking size of unsigned long long... $ECHO_C" >&6; } -if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 +echo "${ECHO_T}$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } +if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then + HAVE_LIB_FREETYPE=1 +fi + +fi + + +for ac_header in ft2build.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8016,16 +8135,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -8044,116 +8154,129 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef unsigned long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef unsigned long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; -test_array [0] = 0 + HAVE_FT2BUILD_H=1 +fi - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF +done + +if test "x${HAVE_FT2BUILD_H}" '=' "x";then + +for ac_header in freetype/freetype.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef unsigned long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -8172,454 +8295,296 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - typedef unsigned long long ac__type_sizeof_; -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_unsigned_long_long=$ac_lo;; -'') if test "$ac_cv_type_unsigned_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_unsigned_long_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - typedef unsigned long long ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } -#include -#include -int -main () -{ +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_unsigned_long_long=`cat conftest.val` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_unsigned_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long) -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (unsigned long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_unsigned_long_long=0 - fi + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi -rm -f conftest.val +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + HAVE_FREETYPE_FREETYPE_H=1 fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long" >&6; } - +done -cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long -_ACEOF +fi +if test "x${HAVE_LIB_FREETYPE}" '!=' "x" -o \ + "x${FREETYPE_CONFIG}" '!=' "x";then + if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then + HAVE_FREETYPE=1 + fi + if test "x${HAVE_FT2BUILD_H}" '!=' "x";then + HAVE_FREETYPE=1 + fi +fi +if test "x${HAVE_FREETYPE}" = "x1"; then + if test "x${FREETYPE_CONFIG}" '!=' "x"; then + LIBS="$LIBS "`$FREETYPE_CONFIG --libs` + else + LIBS="$LIBS -lfreetype" + fi + if test "x${HAVE_FT2BUILD_H}" = "x1"; then + HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H' + fi + { echo "$as_me:$LINENO: checking whether we can compile the freetype test program" >&5 +echo $ECHO_N "checking whether we can compile the freetype test program... $ECHO_C" >&6; } -# Extract the first word of "freetype-config", so it can be a program name with args. -set dummy freetype-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $FREETYPE_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy=""$PATH:/usr/local/bin:/sw/bin:/opt/local/bin"" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + cat > conftest.c << EOF +$HAVE_FT2BUILD_H_DEFINE - ;; -esac -fi -FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG -if test -n "$FREETYPE_CONFIG"; then - { echo "$as_me:$LINENO: result: $FREETYPE_CONFIG" >&5 -echo "${ECHO_T}$FREETYPE_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi +#ifdef HAVE_FT2BUILD_H +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_SIZES_H +#include FT_SFNT_NAMES_H +#include FT_TRUETYPE_IDS_H +#include FT_OUTLINE_H +#else +#include +#include +#include +#include +#include +#include +#endif +int main() +{ + FT_Library ftlibrary; + FT_Face face; + FT_Error error; + FT_ULong charcode; + FT_UInt gindex; + FT_Glyph glyph; + FT_BBox bbox; + FT_Matrix matrix; + FT_UInt i; + char* name = 0; + char italic, bold; + FT_Init_FreeType(&ftlibrary); + FT_New_Face(ftlibrary, "filename", 0, &face); + i = face->num_glyphs - 1; + italic = face->style_flags&FT_STYLE_FLAG_ITALIC; + bold = face->style_flags&FT_STYLE_FLAG_BOLD; + FT_Get_Postscript_Name(face); + FT_Get_Char_Index(face, 33); + FT_Get_First_Char(face, &i); + FT_Get_Next_Char(face, 33, &i); + if(FT_HAS_GLYPH_NAMES(face)) { + FT_Get_Glyph_Name(face, 33, name, 127); + } + FT_Load_Glyph(face, 33, FT_LOAD_NO_BITMAP|FT_LOAD_NO_SCALE); + FT_Get_Glyph(face->glyph, &glyph); + FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &bbox); + FT_Done_Glyph(glyph); + FT_Done_Face(face); + FT_Done_FreeType(ftlibrary); + return 0; +} +EOF -OLDCPPFLAGS="${CPPFLAGS}" -OLDLIBS="${LIBS}" -if test "x${FREETYPE_CONFIG}" '!=' "x"; then - CPPFLAGS="$CPPFLAGS "`$FREETYPE_CONFIG --cflags` -else if test -d /usr/include/freetype2; then - CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2" -else if test -d /usr/local/include/freetype2; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include/freetype2" -fi -fi -fi + ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}' + if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -if test "x${FREETYPE_CONFIG}" '=' "x";then - # if we didn't find the freetype-config program, we won't - # know where the libs are expected to be. So just blindly - # try to link against them. - { echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5 -echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6; } -if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfreetype $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREETYPE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char FT_Init_FreeType (); -int -main () -{ -return FT_Init_FreeType (); - ; - return 0; -} + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREETYPE_FREETYPE_H 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_freetype_FT_Init_FreeType=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_freetype_FT_Init_FreeType=no -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 -echo "${ECHO_T}$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } -if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then - HAVE_LIB_FREETYPE=1 +cat >>confdefs.h <<\_ACEOF +#define USE_FREETYPE 1 +_ACEOF + # for ttf2tp1 + else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + HAVE_FREETYPE=0 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + rm -f conftest* fi +# if the above didn't work out, reset all changes to the compiler variables. +if test "x${HAVE_FREETYPE}" '!=' "x1"; then + CPPFLAGS=$OLDCPPFLAGS + LIBS=$OLDLIBS fi -for ac_header in ft2build.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi +OLDCPPFLAGS="${CPPFLAGS}" +OLDLIBS="${LIBS}" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +if test -d /usr/include/fontconfig; then + CPPFLAGS="$CPPFLAGS -I/usr/include/fontconfig" +fi -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for FcInit in -lfontconfig" >&5 +echo $ECHO_N "checking for FcInit in -lfontconfig... $ECHO_C" >&6; } +if test "${ac_cv_lib_fontconfig_FcInit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfontconfig $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char FcInit (); +int +main () +{ +return FcInit (); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then - ac_header_preproc=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_fontconfig_FcInit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_lib_fontconfig_FcInit=no fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - HAVE_FT2BUILD_H=1 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_fontconfig_FcInit" >&5 +echo "${ECHO_T}$ac_cv_lib_fontconfig_FcInit" >&6; } +if test $ac_cv_lib_fontconfig_FcInit = yes; then + HAVE_LIB_FONTCONFIG=1 fi -done - -if test "x${HAVE_FT2BUILD_H}" '=' "x";then -for ac_header in freetype/freetype.h +for ac_header in fontconfig.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -8753,141 +8718,246 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - HAVE_FREETYPE_FREETYPE_H=1 + HAVE_FONTCONFIG_H=1 fi done + +if test "x${HAVE_LIB_FONTCONFIG}" != "x";then +if test "x${HAVE_FONTCONFIG_H}" != "x";then + HAVE_FONTCONFIG=1 +fi fi -if test "x${HAVE_LIB_FREETYPE}" '!=' "x" -o \ - "x${FREETYPE_CONFIG}" '!=' "x";then - if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then - HAVE_FREETYPE=1 - fi - if test "x${HAVE_FT2BUILD_H}" '!=' "x";then - HAVE_FREETYPE=1 - fi +if test "x${HAVE_FONTCONFIG}" = "x1"; then + LIBS="$LIBS -lfontconfig" +{ echo "$as_me:$LINENO: checking whether we can compile the fontconfig test program" >&5 +echo $ECHO_N "checking whether we can compile the fontconfig test program... $ECHO_C" >&6; } + +if (echo $LIBS | grep lfreetype >/dev/null 2>&1); then + #move freetype library to the end of libraries, otherwise fontconfig + #won't compile. + LIBS=`echo $LIBS | sed -e 's/-lfreetype//g' -e 's/$/ -lfreetype/'` fi -if test "x${HAVE_FREETYPE}" = "x1"; then - if test "x${FREETYPE_CONFIG}" '!=' "x"; then - LIBS="$LIBS "`$FREETYPE_CONFIG --libs` +cat > conftest.c << EOF +#include +#include + +int main() +{ + FcPattern *pattern, *match; + FcResult result; + FcChar8 *v; + char*s1="abc",*s2="ABC"; + strcasecmp(s1,s2); + FcInit(); + pattern = FcPatternBuild(0, FC_FAMILY, FcTypeString, "", 0); + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); + FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); + + FcConfig*c = FcConfigCreate(); + FcConfigParseAndLoad(c, (FcChar8*)"", 1); + FcConfigBuildFonts(c); + FcConfigSetCurrent(c); + + FcFontSet * set = FcConfigGetFonts(c, FcSetSystem); + FcFontSetDestroy(set); + + FcConfigSubstitute(0, pattern, FcMatchPattern); + FcDefaultSubstitute(pattern); + match = FcFontMatch(0, pattern, &result); + FcPatternGetString(match, "family", 0, &v) == FcResultMatch; + FcPatternGetBool(match, "family", 0, &v) == FcResultMatch; + FcPatternPrint(pattern); + FcPatternDestroy(pattern); + FcPatternDestroy(match); + FcFini(); + return 0; +} +EOF + + ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}' + if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FONTCONFIG 1 +_ACEOF + else - LIBS="$LIBS -lfreetype" + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + HAVE_FONTCONFIG=0 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + rm -f conftest* +fi - if test "x${HAVE_FT2BUILD_H}" = "x1"; then - HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H' - fi +# if the above didn't work out, reset all changes to the compiler variables. +if test "x${HAVE_FONTCONFIG}" "!=" "x1"; then + CPPFLAGS=$OLDCPPFLAGS + LIBS=$OLDLIBS +fi - { echo "$as_me:$LINENO: checking whether we can compile the freetype test program" >&5 -echo $ECHO_N "checking whether we can compile the freetype test program... $ECHO_C" >&6; } - cat > conftest.c << EOF -$HAVE_FT2BUILD_H_DEFINE -#ifdef HAVE_FT2BUILD_H -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H -#include FT_SIZES_H -#include FT_SFNT_NAMES_H -#include FT_TRUETYPE_IDS_H -#include FT_OUTLINE_H -#else -#include -#include -#include -#include -#include -#include -#endif +OLDCPPFLAGS="${CPPFLAGS}" +OLDLIBS="${LIBS}" -int main() -{ - FT_Library ftlibrary; - FT_Face face; - FT_Error error; - FT_ULong charcode; - FT_UInt gindex; - FT_Glyph glyph; - FT_BBox bbox; - FT_Matrix matrix; - FT_UInt i; - char* name = 0; - char italic, bold; - FT_Init_FreeType(&ftlibrary); - FT_New_Face(ftlibrary, "filename", 0, &face); - i = face->num_glyphs - 1; - italic = face->style_flags&FT_STYLE_FLAG_ITALIC; - bold = face->style_flags&FT_STYLE_FLAG_BOLD; - FT_Get_Postscript_Name(face); - FT_Get_Char_Index(face, 33); - FT_Get_First_Char(face, &i); - FT_Get_Next_Char(face, 33, &i); - if(FT_HAS_GLYPH_NAMES(face)) { - FT_Get_Glyph_Name(face, 33, name, 127); - } - FT_Load_Glyph(face, 33, FT_LOAD_NO_BITMAP|FT_LOAD_NO_SCALE); - FT_Get_Glyph(face->glyph, &glyph); - FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &bbox); - FT_Done_Glyph(glyph); - FT_Done_Face(face); - FT_Done_FreeType(ftlibrary); - return 0; +{ echo "$as_me:$LINENO: checking for glBegin in -lGL" >&5 +echo $ECHO_N "checking for glBegin in -lGL... $ECHO_C" >&6; } +if test "${ac_cv_lib_GL_glBegin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGL $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char glBegin (); +int +main () +{ +return glBegin (); + ; + return 0; } -EOF +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_GL_glBegin=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}' - if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<_ACEOF -#define HAVE_FREETYPE 1 + ac_cv_lib_GL_glBegin=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glBegin" >&5 +echo "${ECHO_T}$ac_cv_lib_GL_glBegin" >&6; } +if test $ac_cv_lib_GL_glBegin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGL 1 _ACEOF - cat >>confdefs.h <<_ACEOF -#define HAVE_FREETYPE_FREETYPE_H 1 + LIBS="-lGL $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for gluBeginSurface in -lGLU" >&5 +echo $ECHO_N "checking for gluBeginSurface in -lGLU... $ECHO_C" >&6; } +if test "${ac_cv_lib_GLU_gluBeginSurface+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lGLU $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - cat >>confdefs.h <<_ACEOF -#define USE_FREETYPE 1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gluBeginSurface (); +int +main () +{ +return gluBeginSurface (); + ; + return 0; +} _ACEOF - # for ttf2tp1 - else - echo "configure: failed program was:" >&5 - cat conftest.c >&5 - HAVE_FREETYPE=0 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - rm -f conftest* -fi +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_GLU_gluBeginSurface=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# if the above didn't work out, reset all changes to the compiler variables. -if test "x${HAVE_FREETYPE}" '!=' "x1"; then - CPPFLAGS=$OLDCPPFLAGS - LIBS=$OLDLIBS + ac_cv_lib_GLU_gluBeginSurface=no fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginSurface" >&5 +echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginSurface" >&6; } +if test $ac_cv_lib_GLU_gluBeginSurface = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGLU 1 +_ACEOF + LIBS="-lGLU $LIBS" -OLDCPPFLAGS="${CPPFLAGS}" -OLDLIBS="${LIBS}" - -if test -d /usr/include/fontconfig; then - CPPFLAGS="$CPPFLAGS -I/usr/include/fontconfig" fi -{ echo "$as_me:$LINENO: checking for FcInit in -lfontconfig" >&5 -echo $ECHO_N "checking for FcInit in -lfontconfig... $ECHO_C" >&6; } -if test "${ac_cv_lib_fontconfig_FcInit+set}" = set; then + +{ echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5 +echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6; } +if test "${ac_cv_lib_glut_glutInit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lfontconfig $LIBS" +LIBS="-lglut $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8901,11 +8971,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char FcInit (); +char glutInit (); int main () { -return FcInit (); +return glutInit (); ; return 0; } @@ -8928,26 +8998,32 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_fontconfig_FcInit=yes + ac_cv_lib_glut_glutInit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_fontconfig_FcInit=no + ac_cv_lib_glut_glutInit=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_fontconfig_FcInit" >&5 -echo "${ECHO_T}$ac_cv_lib_fontconfig_FcInit" >&6; } -if test $ac_cv_lib_fontconfig_FcInit = yes; then - HAVE_LIB_FONTCONFIG=1 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5 +echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6; } +if test $ac_cv_lib_glut_glutInit = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGLUT 1 +_ACEOF + + LIBS="-lglut $LIBS" + fi -for ac_header in fontconfig.h + +for ac_header in GL/gl.h GL/glut.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -9081,91 +9157,80 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - HAVE_FONTCONFIG_H=1 -fi - -done - -if test "x${HAVE_LIB_FONTCONFIG}" != "x";then -if test "x${HAVE_FONTCONFIG_H}" != "x";then - HAVE_FONTCONFIG=1 -fi fi -if test "x${HAVE_FONTCONFIG}" = "x1"; then - LIBS="$LIBS -lfontconfig" -{ echo "$as_me:$LINENO: checking whether we can compile the fontconfig test program" >&5 -echo $ECHO_N "checking whether we can compile the fontconfig test program... $ECHO_C" >&6; } +done -if (echo $LIBS | grep lfreetype >/dev/null 2>&1); then - #move freetype library to the end of libraries, otherwise fontconfig - #won't compile. - LIBS=`echo $LIBS | sed -e 's/-lfreetype//g' -e 's/$/ -lfreetype/'` -fi cat > conftest.c << EOF -#include -#include +#include +#include +#include -int main() +int main(int argc, char*argv) { - FcPattern *pattern, *match; - FcResult result; - FcChar8 *v; - char*s1="abc",*s2="ABC"; - strcasecmp(s1,s2); - FcInit(); - pattern = FcPatternBuild(0, FC_FAMILY, FcTypeString, "", 0); - FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); - FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); - match = FcFontMatch(0, pattern, &result); - FcPatternGetString(match, "family", 0, &v) == FcResultMatch; - FcPatternPrint(pattern); - FcPatternDestroy(pattern); - FcPatternDestroy(match); - return 0; + glutInit(&argc, argv); + glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); + glutInitWindowSize(320,200); + glutInitWindowPosition(0,0); + glutCreateWindow("main"); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glShadeModel(GL_SMOOTH); + glEnable (GL_LINE_SMOOTH); + glEnable (GL_POLYGON_SMOOTH); + glEnable (GL_BLEND); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); + glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE); } EOF - ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}' - if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: yes" >&5 +{ echo "$as_me:$LINENO: checking whether we can compile the opengl test program" >&5 +echo $ECHO_N "checking whether we can compile the opengl test program... $ECHO_C" >&6; } + +ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}' +if { (eval echo opengl.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<_ACEOF -#define HAVE_FONTCONFIG 1 + HAVE_OPENGL=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENGL 1 _ACEOF - else - echo "configure: failed program was:" >&5 - cat conftest.c >&5 - HAVE_FONTCONFIG=0 - { echo "$as_me:$LINENO: result: no" >&5 +else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + HAVE_OPENGL= + { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } - fi - rm -f conftest* fi +rm -f conftest* # if the above didn't work out, reset all changes to the compiler variables. -if test "x${HAVE_FREETYPE}" "!=" "x1"; then +if test "x${HAVE_OPENGL}" "!=" "x1"; then CPPFLAGS=$OLDCPPFLAGS LIBS=$OLDLIBS fi +if test "$HAVE_OPENGL";then + DEVICE_OPENGL='devices/opengl.$(O)' + +fi -lame_objects= +lame_in_source= lame_makefile= if test "x${DISABLE_LAME}" = "xtrue"; then echo "*" Disabling lame support... else # old lame code at lib/lame if test -f lib/lame/Makefile.in; then - lame_objects="lame/psymodel.\$(O) lame/fft.\$(O) lame/newmdct.\$(O) lame/quantize.\$(O) lame/takehiro.\$(O) lame/reservoir.\$(O) lame/quantize_pvt.\$(O) lame/vbrquantize.\$(O) lame/encoder.\$(O) lame/id3tag.\$(O) lame/version.\$(O) lame/tables.\$(O) lame/util.\$(O) lame/bitstream.\$(O) lame/set_get.\$(O) lame/VbrTag.\$(O) lame/lame.\$(O)" + lame_in_source='$(lame_objects)' lame_makefile="lib/lame/Makefile" - CPPFLAGS="$CPPFLAGS -Ilame" - cat >>confdefs.h <<_ACEOF + CPPFLAGS="$CPPFLAGS -Ilame -Ilib/lame" + +cat >>confdefs.h <<\_ACEOF #define HAVE_LAME 1 _ACEOF @@ -9250,6 +9315,7 @@ else NO_LIBMP3LAME=1 fi + HASLAMEHEADER= for ac_header in lame.h do @@ -9385,13 +9451,13 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - + HASLAMEHEADER=1 fi done - if test "x$NO_LIBMP3LAME" "!=" "x1" -a "x$ac_cv_header_lame_h" "!=" "x";then - cat >>confdefs.h <<_ACEOF + if test "x$NO_LIBMP3LAME" "!=" "x1" -a "x$HASLAMEHEADER" '!=' "x";then + cat >>confdefs.h <<\_ACEOF #define HAVE_LAME 1 _ACEOF @@ -9400,6 +9466,20 @@ _ACEOF fi + +cat >>confdefs.h <<\_ACEOF +#define INTERNAL_LIBART 1 +_ACEOF + +art_in_source='$(art_objects)' +splash_in_source='$(splash_objects)' +xpdf_in_source='$(xpdf_objects)' + + + + + + # ------------------------------------------------------------------ @@ -9695,7 +9775,8 @@ if test "x$AVIFILE_CONFIG" '!=' "x";then echo "${ECHO_T}yes" >&6; } AVIFILE=true export AVIFILE - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define AVIFILE true _ACEOF @@ -9714,7 +9795,8 @@ rm -f conftest* if test "x${AVIFILE}" = "xtrue"; then VIDEO_LIBS="$VIDEO_LIBS $AVIFILE_LIBS" VIDEO_CFLAGS="$VIDEO_CFLAGS $AVIFILE_CFLAGS" - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_AVIFILE 1 _ACEOF @@ -9734,7 +9816,8 @@ fi # ------------------------------------------------------------------ if test "x${UNCOMPRESS}" = "xgzip"; then - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_GZIP 1 _ACEOF @@ -9753,8 +9836,8 @@ else if test "x$PYTHON_LIB" '!=' "x" -o "x$PYTHON_INCLUDES" '!=' "x";then echo "Set both PYTHON_LIB and PYTHON_INCLUDES, or none at all" fi - # iterate through version 2.2 to 2.5 - for v in 2 3 4 5; do + # iterate through version 2.2 to 2.6 + for v in 2 3 4 5 6; do # Linux if test -f "/usr/include/python2.$v/Python.h";then PY_VERSION=2.$v @@ -9767,17 +9850,16 @@ else fi PYTHON_INCLUDES="-I/usr/include/python$PY_VERSION" # Mac OS X - elif test -f "/System/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/Python.h";then - #TODO: test for /System/Library/Frameworks/Python.framework/Versions/2.3/Python ? + elif test -f "/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/Python.h";then PY_VERSION=2.$v PYTHON_LIB="-framework Python" - if test -f "/Library/Python/2.$v/PIL/_imaging.so";then + if test -f "/Library/Frameworks/Python.framework/Versions/2.$v/site-packages/PIL/_imaging.so";then PYTHON_LIB2="$PYTHON_LIB /Library/Python/2.$v/PIL/_imaging.so" HAVE_PYTHON_IMAGING_LIB=1 else PYTHON_LIB2="$PYTHON_LIB" fi - PYTHON_INCLUDES="-I/System/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/" + PYTHON_INCLUDES="-I/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/" # Mac OS X [Fink]: elif test "(" -f "/sw/lib/python2.$v/config/libpython2.$v.dylib" \ -o -f "/sw/lib/python2.$v/config/libpython2.$v.a" \ @@ -9847,7 +9929,8 @@ EOF ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS ${PYTHON_LIB2} $LIBS -o conftest${ac_exeext}' if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then PYTHON_LIB="${PYTHON_LIB2}" - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_PYTHON_IMAGING 1 _ACEOF @@ -9961,7 +10044,7 @@ LIBPDF='libpdf$(A)' if test "x${DISABLEPDF2SWF}" = "xtrue"; then echo "* Disabling pdf2swf tool..." rm -f lib/pdf/Makefile - echo all install uninstall clean: > lib/pdf/Makefile + echo all install uninstall clean libpdf: > lib/pdf/Makefile pdf2swf_makefile="" PDF2SWF= LIBPDF= @@ -10008,9 +10091,15 @@ fi # ------------------------------------------------------------------ + + + + + + if test -f "release.in"; then release_in="./release"; fi -if test -f "wx/Makefile.in"; then wx_in="wx/Makefile"; fi -FILES="$release_in $wx_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile pdf2swf/fonts/Makefile ${pythonrfxswf} ${lame_makefile} lib/art/Makefile lib/swf/Makefile" +if test -f "Makefile.new.in"; then mk_in="./Makefile.new"; fi +FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythonrfxswf} ${lame_makefile} lib/art/Makefile lib/readers/Makefile" ac_config_files="$ac_config_files ${FILES}" cat >confcache <<\_ACEOF @@ -10710,7 +10799,11 @@ PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim FREETYPE_CONFIG!$FREETYPE_CONFIG$ac_delim -lame_objects!$lame_objects$ac_delim +DEVICE_OPENGL!$DEVICE_OPENGL$ac_delim +lame_in_source!$lame_in_source$ac_delim +art_in_source!$art_in_source$ac_delim +xpdf_in_source!$xpdf_in_source$ac_delim +splash_in_source!$splash_in_source$ac_delim AVIFILE_CONFIG!$AVIFILE_CONFIG$ac_delim VIDEO_LIBS!$VIDEO_LIBS$ac_delim VIDEO_CFLAGS!$VIDEO_CFLAGS$ac_delim @@ -10722,12 +10815,53 @@ PDF2SWF!$PDF2SWF$ac_delim LIBPDF!$LIBPDF$ac_delim JPEG2SWF!$JPEG2SWF$ac_delim GIF2SWF!$GIF2SWF$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF PNG2SWF!$PNG2SWF$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -10745,8 +10879,8 @@ if test -n "$ac_eof"; then fi cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g @@ -10759,6 +10893,8 @@ N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g CEOF$ac_eof _ACEOF @@ -11006,7 +11142,7 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed 's/|#_!!_#|//g' >$tmp/out +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&