diff options
author | Karl Berry <karl@freefriends.org> | 2008-01-23 21:18:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-01-23 21:18:08 +0000 |
commit | 7f8190c0c1f14af45ff7c5d81a12e2a418b222cd (patch) | |
tree | fddac03ad7f797c2a11bdc1d3c87edc674741090 /Build/source/texk | |
parent | 1e0c37bbf562412cf3073469ca0bd1bda220b163 (diff) |
ensure AC_PROG_CPP called (JK mail 3 Nov 2006 11:08:13)
git-svn-id: svn://tug.org/texlive/trunk@6382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-x | Build/source/texk/ttf2pk/configure | 152 |
1 files changed, 77 insertions, 75 deletions
diff --git a/Build/source/texk/ttf2pk/configure b/Build/source/texk/ttf2pk/configure index 60740f861a3..cbae12450c3 100755 --- a/Build/source/texk/ttf2pk/configure +++ b/Build/source/texk/ttf2pk/configure @@ -1143,68 +1143,9 @@ else fi fi - OLD_LDFLAGS=$LDFLAGS - OLD_CPP=$CPP - OLD_LIBS=$LIBS - - LDFLAGS="$LDFLAGS $EXTRA_FREETYPE_LIBDIR" - CPP="$CPP $EXTRA_FREETYPE_INCLUDE" - - if test "$with_system_freetype" = yes; then - echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 -echo "configure:1156: checking for TT_Init_FreeType in -lttf" >&5 -ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lttf $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1164 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char TT_Init_FreeType(); - -int main() { -TT_Init_FreeType() -; return 0; } -EOF -if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo ttf | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lttf $LIBS" - -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Standard FREETYPE library not found. Compiling my own." 1>&2 - with_system_freetype=no -fi - - fi - - if test "$with_system_freetype" = yes; then - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1208: checking how to run the C preprocessor" >&5 + # be sure we have a good value for CPP, since we're about to save it. + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1149: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1219,13 +1160,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1223 "configure" +#line 1164 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1236,13 +1177,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1240 "configure" +#line 1181 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1253,13 +1194,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1257 "configure" +#line 1198 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1283,21 +1224,82 @@ else fi echo "$ac_t""$CPP" 1>&6 -for ac_hdr in freetype.h + + OLD_LDFLAGS=$LDFLAGS + OLD_CPP=$CPP + OLD_LIBS=$LIBS + + LDFLAGS="$LDFLAGS $EXTRA_FREETYPE_LIBDIR" + CPP="$CPP $EXTRA_FREETYPE_INCLUDE" + + if test "$with_system_freetype" = yes; then + echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6 +echo "configure:1238: checking for TT_Init_FreeType in -lttf" >&5 +ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lttf $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1246 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char TT_Init_FreeType(); + +int main() { +TT_Init_FreeType() +; return 0; } +EOF +if { (eval echo configure:1257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo ttf | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lttf $LIBS" + +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: Standard FREETYPE library not found. Compiling my own." 1>&2 + with_system_freetype=no +fi + + fi + + if test "$with_system_freetype" = yes; then + for ac_hdr in freetype.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1291: checking for $ac_hdr" >&5 +echo "configure:1293: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1296 "configure" +#line 1298 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1352,7 +1354,7 @@ fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:1356: checking for main in -lm" >&5 +echo "configure:1358: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1360,14 +1362,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 1364 "configure" +#line 1366 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else |