X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure;h=be20bf3026375cc0a641ecbe73cebeeef1a482eb;hb=2c902d6065f9856adf31e8540a94f1e42e68e905;hp=d9ba45ce9e42fb3690fd2f6a92b9a398573221f8;hpb=c28aecf9fc41e3a03494bacf7279745425e2fa18;p=xscreensaver diff --git a/configure b/configure index d9ba45ce..be20bf30 100755 --- a/configure +++ b/configure @@ -1315,6 +1315,18 @@ done +############################################################################### +# +# Function to figure out how to turn off Objective C on MacOS X. +# (We have to do this to work around an Apple-specific gcc bug.) +# +############################################################################### + + + + + + ############################################################################### # # Function to figure out how to create directory trees. @@ -2425,6 +2437,32 @@ echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6 fi fi +if test -n "$GCC"; then + if test -n "$GCC"; then + echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5 +echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6 +if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if ( ( gcc -E -no-cpp-precomp - /dev/null ) 2>&1 | \ + grep unrecognized >/dev/null ); then + ac_cv_gcc_accepts_no_cpp_precomp=no + else + ac_cv_gcc_accepts_no_cpp_precomp=yes + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5 +echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6 + ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp" + fi + + if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then + echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5 +echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6 + CC="$CC -no-cpp-precomp" + fi + fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6077,6 +6115,16 @@ if test $ac_cv_lib_gen_regcmp = yes; then fi fi + + ;; + *-darwin*) + + # On MacOS X (10.x with "fink"), many things are under /sw/. + # + if test -d /sw/include ; then + X_CFLAGS="-I/sw/include $X_CFLAGS" + X_LIBS="-L/sw/lib $X_LIBS" + fi ;; esac echo "$as_me:$LINENO: checking for XPointer" >&5 @@ -11012,7 +11060,91 @@ _ACEOF if test "$have_kerberos5" = yes ; then # from Matt Knopp # (who got it from amu@mit.edu) - PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err" + + PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err" + + # jwz: MacOS X uses -lkrb5, but not -lcrypt + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" +# ac_save_LIBS="$LIBS" + + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + # note: $X_CFLAGS includes $x_includes + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" + fi + # note: $X_LIBS includes $x_libraries + LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" + + echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_crypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char crypt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +crypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypt_crypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_crypt_crypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 +if test $ac_cv_lib_crypt_crypt = yes; then + PASSWD_LIBS="$PASSWD_LIBS -lcrypt" +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" +# LIBS="$ac_save_LIBS" + + elif test "$have_kerberos" = yes ; then # from Tim Showalter for FreeBSD 4.2 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err" @@ -12720,15 +12852,16 @@ fi echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6 ac_gtk_version_string=$ac_cv_gtk_version_string + parse_gtk_version_string fi - parse_gtk_version_string - - if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002 - then - have_gtk=no - have_gnome=no - jurassic_gtk=yes + if test "$have_gtk" = yes; then + if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002 + then + have_gtk=no + have_gnome=no + jurassic_gtk=yes + fi fi if test "$have_gtk" = yes; then @@ -12768,7 +12901,7 @@ echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6 if test "${ac_cv_gnome_config_cflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if ( $gnome_config --cflags $gnome_config_libs >/dev/null 2>&1 | \ + if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \ grep Unknown >/dev/null ) ; then ac_cv_gnome_config_cflags='' else @@ -12793,7 +12926,7 @@ echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6 if test "${ac_cv_gnome_config_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if ( $gnome_config --libs $gnome_config_libs >/dev/null 2>&1 | + if ( $gnome_config --libs $gnome_config_libs 2>&1 | grep Unknown >/dev/null ) ; then ac_cv_gnome_config_libs='' else @@ -14521,13 +14654,34 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION # include -# define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION -# define MESA_MINOR_VERSION XMESA_MINOR_VERSION +# ifdef XMESA_MAJOR_VERSION + /* Around Mesa 3.2, they took out the Mesa version number, so instead, + we have to check the XMesa version number (the number of the X protocol + support, which seems to be the same as the Mesa version number.) + */ +# define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION +# define MESA_MINOR_VERSION XMESA_MINOR_VERSION +# else + /* Oh great. Some time after 3.4, they took out the xmesa.h header file, + so we have no way of telling what version of Mesa this is at all. + So, we'll guess that the osmesa version (the "offscreen protocol") + is less than or equal to the real mesa version number. Except that + if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in + Mesa 3.4. And Mesa 3.3 had xmesa.h. What a complete load of shit! + */ +# include +# define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION +# define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably? +# if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3 +# undef MESA_MINOR_VERSION +# define MESA_MINOR_VERSION 4 or newer, probably? +# endif +# endif #endif configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION EOF @@ -14543,7 +14697,7 @@ EOF # M4 sucks!! mglv=`echo "$mglv" | sed -n \ - 's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'` + 's/^configure: *\([0-9][0-9]*\) *\([0-9].*\)$/\1.\2/p'` rm -f conftest.$ac_ext @@ -14554,9 +14708,12 @@ EOF ac_mesagl_version=unknown ac_mesagl_version_string=unknown else - ac_mesagl_version_string=$mglv - maj=`echo $mglv | sed -n 's/\..*//p'` - min=`echo $mglv | sed -n 's/.*\.//p'` + ac_mesagl_version_string="$mglv" + # M4 sucks!! + + maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'` + min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'` + ac_mesagl_version=`echo "$maj * 1000 + $min" | bc` if test -z "$ac_mesagl_version"; then ac_mesagl_version=unknown @@ -15307,7 +15464,6 @@ if test "$have_motif" = yes -a "$have_xpm" = yes ; then fi fi - ############################################################################### # # Check for -lgdk_pixbuf. @@ -17473,7 +17629,6 @@ fi if test "$have_gle" = yes; then GLE_EXES='$(GLE_EXES)' - GLE_MEN='$(GLE_MEN)' GLE_KLUDGE="${tab} " else GLE_KLUDGE="-${tab} " @@ -17638,7 +17793,6 @@ INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'` - APPDEFAULTS=$ac_x_app_defaults @@ -18334,7 +18488,6 @@ s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t s,@GL_MEN@,$GL_MEN,;t t s,@GL_KLUDGE@,$GL_KLUDGE,;t t s,@GLE_EXES@,$GLE_EXES,;t t -s,@GLE_MEN@,$GLE_MEN,;t t s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t @@ -19134,8 +19287,7 @@ if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ echo '' warn2 'Some of the demos will not be as colorful as they' warn2 'could be. You should consider installing Pixbuf or' - warn2 'XPM and re-running configure. (Remember to delete' - warn2 'the config.cache file first.) The Pixbuf library is' + warn2 'XPM and re-running configure. The Pixbuf library is' warn2 'a part of GNOME. The XPM library comes with most' warn2 'X11 installations; you can also find it at the X11' warn2 'archive sites, such as .' @@ -19177,13 +19329,14 @@ if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then warn2 "Make sure you are using version $preferred_mesagl or newer." elif test \! "$ac_mesagl_version" -gt 2006; then - warnL "MesaGL version $mgv is being used. MesaGL 2.6 and earlier" - warn2 "have a security bug. It is strongly recommended that you" - warn2 "upgrade to at least version $preferred_mesagl." + warnL "MesaGL version number is $mgv --" + warn2 "MesaGL 2.6 and earlier have a security bug. It is strongly" + warn2 "recommended that you upgrade to at least version $preferred_mesagl." elif test \! "$ac_mesagl_version" -gt 3003; then - warnL "MesaGL version $mgv is being used. That version has some" - warn2 "bugs; it is recommended that you upgrade to $pgl or newer." + warnL "MesaGL version number is $mgv --" + warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended" + warn2 "that you upgrade to $pgl or newer." fi fi @@ -19207,8 +19360,7 @@ if test "$have_gl" = no ; then echo '' warn2 'Those demos which use 3D will not be built or installed.' warn2 'You might want to consider installing OpenGL and' - warn2 're-running configure. (Remember to delete the' - warn2 "config.cache file first.) If your vendor doesn't ship" + warn2 "re-running configure. If your vendor doesn't ship" warn2 'their own implementation of OpenGL, you can get a free' warn2 'version at . For general OpenGL' warn2 'info, see .' @@ -19217,6 +19369,11 @@ fi if test "$have_gl" = yes -a "$have_gle" = no ; then + + # nobody cares about this; don't print the warning unless it was + # requested and not found, or halfway-found. + if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then + if test "$with_gle_req" = yes ; then noteL 'Use of the GLE (GL Extrusion) library was requested, but' warn2 'it was not found (though the OpenGL library was found, and' @@ -19240,11 +19397,11 @@ if test "$have_gl" = yes -a "$have_gle" = no ; then echo '' warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)' warn2 'will not be built or installed. You might want to consider' - warn2 'installing GLE and re-running configure. (Remember to delete' - warn2 'the config.cache file first.) You can find the GLE library' - warn2 'at . For general OpenGL info,' - warn2 'see .' + warn2 'installing GLE and re-running configure. You can find the' + warn2 'GLE library at . For general' + warn2 'OpenGL info, see .' + fi fi @@ -19365,7 +19522,7 @@ if test "$do_dir_warning" = yes; then echo ' "xscreensaver-demo", and "xscreensaver-command" executables' echo " will be installed in ${bindir}/." echo "" - echo " The various graphics demos (140+ different executables) will" + echo " The various graphics demos (150+ different executables) will" echo " be installed in ${HACKDIR}/." echo "" echo " If you would prefer the demos to be installed elsewhere,"