X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.in;h=f9ba1a78069c2767ca92efc5a145f678f3341c30;hb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5;hp=76ccf0f9f11af1584b2842d877133dac910e4e95;hpb=4cecfc89e5e889c7232693897c06168fb378bd5c;p=xscreensaver diff --git a/configure.in b/configure.in index 76ccf0f9..f9ba1a78 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# configure.in --- xscreensaver, Copyright (c) 1997-2002 Jamie Zawinski. +# configure.in --- xscreensaver, Copyright (c) 1997-2003 Jamie Zawinski. # AC_PREREQ(2.52) @@ -140,6 +140,38 @@ AC_DEFUN(AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE, ]) +############################################################################### +# +# 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.) +# +############################################################################### + +AC_DEFUN(AC_GCC_ACCEPTS_NO_CPP_PRECOMP, + [if test -n "$GCC"; then + AC_CACHE_CHECK([whether gcc accepts -no-cpp-precomp], + ac_cv_gcc_accepts_no_cpp_precomp, + [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]) + ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp" + fi +]) + +AC_DEFUN(AC_NO_OBJECTIVE_C, + [if test -n "$GCC"; then + AC_GCC_ACCEPTS_NO_CPP_PRECOMP + if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then + AC_MSG_RESULT(Disabling Objective C extensions in ANSI C code.) + CC="$CC -no-cpp-precomp" + fi + fi +]) + + ############################################################################### # # Function to figure out how to create directory trees. @@ -590,6 +622,16 @@ AC_DEFUN(AC_X_RANDOM_PATHS, # Some versions of Slowlaris Motif require -lgen. But not all. Why? AC_CHECK_LIB(gen, regcmp, [X_LIBS="$X_LIBS -lgen"]) 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]) @@ -743,6 +785,7 @@ AC_DEFUN(HANDLE_X_PATH_ARG, [ AC_CANONICAL_HOST AC_PROG_CC_ANSI AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE +AC_NO_OBJECTIVE_C AC_PROG_CPP AC_C_CONST AC_C_INLINE @@ -1315,15 +1358,37 @@ elif test "$with_xf86gamma" != no; then fi +############################################################################### +# +# Check for XF86MiscSetGrabKeysState (but only bother if we are already +# using other XF86 stuff.) +# +############################################################################### + +have_xf86miscsetgrabkeysstate=no +if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then + AC_CHECK_X_LIB(Xxf86misc, XF86MiscSetGrabKeysState, + [have_xf86miscsetgrabkeysstate=yes], + [true], -lXext -lX11) + if test "$have_xf86miscsetgrabkeysstate" = yes ; then + SAVER_LIBS="$SAVER_LIBS -lXxf86misc" + AC_DEFINE(HAVE_XF86MISCSETGRABKEYSSTATE) + fi +fi + + ############################################################################### # # Check for HP XHPDisableReset and XHPEnableReset. # ############################################################################### +AC_MSG_CHECKING([for XHPDisableReset in X11/XHPlib.h]) AC_EGREP_X_HEADER(XHPDisableReset, X11/XHPlib.h, [AC_DEFINE(HAVE_XHPDISABLERESET) - SAVER_LIBS="-lXhp11 $SAVER_LIBS"]) + SAVER_LIBS="-lXhp11 $SAVER_LIBS" + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) ############################################################################### @@ -1535,7 +1600,12 @@ if test "$enable_locking" = yes -a "$with_kerberos" = yes; then 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_CHECK_X_LIB(crypt, crypt, [PASSWD_LIBS="$PASSWD_LIBS -lcrypt"]) + elif test "$have_kerberos" = yes ; then # from Tim Showalter for FreeBSD 4.2 PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err" @@ -2023,15 +2093,16 @@ if test "$with_gtk" = yes; then AC_CACHE_CHECK([Gtk version number], ac_cv_gtk_version_string, [ac_cv_gtk_version_string=`$gtk_config --version`]) 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 @@ -2054,7 +2125,7 @@ if test "$with_gtk" = yes; then gnome_config_libs="gtk capplet gnomeui gdk_pixbuf" AC_MSG_CHECKING(for Gnome capplet includes) AC_CACHE_VAL(ac_cv_gnome_config_cflags, - [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 @@ -2072,7 +2143,7 @@ if test "$with_gtk" = yes; then if test "$have_gnome" = yes -a "$have_gtk" = yes; then AC_MSG_CHECKING(for Gnome capplet libs) AC_CACHE_VAL(ac_cv_gnome_config_libs, - [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 @@ -2603,7 +2674,7 @@ EOF # M4 sucks!! changequote(X,Y) mglv=`echo "$mglv" | sed -n \ - 's/^configure: *\([0-9][0-9]*\) \([0-9].*\)$/\1.\2/p'` + 's/^configure: *\([0-9][0-9]*\) *\([0-9].*\)$/\1.\2/p'` changequote([,]) rm -f conftest.$ac_ext @@ -2976,9 +3047,7 @@ have_jpeg=no with_jpeg_req=unspecified jpeg_halfassed=no AC_ARG_WITH(jpeg, -[ --with-jpeg Include support for the JPEG library in some demos. - (If this library is available, webcollage will be a - . lot faster.)], +[ --with-jpeg Include support for the JPEG library.], [with_jpeg="$withval"; with_jpeg_req="$withval"], [with_jpeg=yes]) @@ -3780,7 +3849,13 @@ if test "$have_jpeg" = no ; then echo '' fi - warn2 "This means the \`webcollage' program will be much slower." + if test "$have_gdk_pixbuf" = no ; then + warn2 "This means that it won't be possible for the image-manipulating" + warn2 "display modes to load files from disk; and it also means that" + warn2 "the \`webcollage' program will be much slower." + else + warn2 "This means the \`webcollage' program will be much slower." + fi fi @@ -3834,6 +3909,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' @@ -3861,6 +3941,7 @@ if test "$have_gl" = yes -a "$have_gle" = no ; then warn2 'GLE library at . For general' warn2 'OpenGL info, see .' + fi fi