diff options
author | Raja R Harinath <harinath@src.gnome.org> | 1998-02-27 04:52:33 +0800 |
---|---|---|
committer | Raja R Harinath <harinath@src.gnome.org> | 1998-02-27 04:52:33 +0800 |
commit | 15dc03c04e166d1ead2698956d7c55b7faf883d6 (patch) | |
tree | 5ee3267826cac470d2cb33844ddda19554936c50 /macros | |
parent | 64121e487c2790e89f0b12c174ec3caa43f7ea2b (diff) | |
download | gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar.gz gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar.bz2 gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar.lz gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar.xz gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.tar.zst gsoc2013-evolution-15dc03c04e166d1ead2698956d7c55b7faf883d6.zip |
Put $X_CFLAGS here, not in $CFLAGS. (GNOME_HAVE_SM): New var. `true' if we
* gnome-x-checks.m4 (CPPFLAGS): Put $X_CFLAGS here, not in
$CFLAGS.
(GNOME_HAVE_SM): New var. `true' if we have libSM, `false'
otherwise.
- Hari
svn path=/trunk/; revision=51
Diffstat (limited to 'macros')
-rw-r--r-- | macros/ChangeLog | 7 | ||||
-rw-r--r-- | macros/gnome-x-checks.m4 | 41 |
2 files changed, 36 insertions, 12 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog index 98d093e34b..c0d4baece4 100644 --- a/macros/ChangeLog +++ b/macros/ChangeLog @@ -1,3 +1,10 @@ +1998-02-26 Raja R Harinath <harinath@cs.umn.edu> + + * gnome-x-checks.m4 (CPPFLAGS): Put $X_CFLAGS here, not in + $CFLAGS. + (GNOME_HAVE_SM): New var. `true' if we have libSM, `false' + otherwise. + 1998-02-19 Raja R Harinath <harinath@cs.umn.edu> * gnome.m4: Remove `GNOME_CHECK_GNOME'. diff --git a/macros/gnome-x-checks.m4 b/macros/gnome-x-checks.m4 index c016435702..a0be04955b 100644 --- a/macros/gnome-x-checks.m4 +++ b/macros/gnome-x-checks.m4 @@ -1,17 +1,35 @@ +dnl GNOME_X_CHECKS +dnl +dnl Basic X11 related checks for X11. At the end, the following will be +dnl defined/changed: +dnl x_{includes,libraries} From AC_PATH_X +dnl X_{CFLAGS,LIBS} From AC_PATH_XTRA +dnl X_{PRE,EXTRA}_LIBS - do - +dnl x_libs Essentially $X_PRE_LIBS -lX11 -Xext $X_EXTRA_LIBS +dnl CPPFLAGS Will include $X_CFLAGS +dnl GNOME_HAVE_SM `true' or `false' depending of if -lSM is present +dnl +dnl The following configure cache variables are defined (but not used): +dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} +dnl AC_DEFUN([GNOME_X_CHECKS], [ AC_PATH_X AC_PATH_XTRA - saved_cflags="$CFLAGS" saved_ldflags="$LDFLAGS" - - CFLAGS="$X_CFLAGS" LDFLAGS="$X_LDFLAGS $X_LIBS" + dnl Hope that X_CFLAGS have only -I and -D. Otherwise, we could + dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" + dnl + dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses + dnl CPPFLAGS, not CFLAGS + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + dnl Checks for libraries. AC_CHECK_LIB(X11, XOpenDisplay, - x_libs="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS", + x_libs="$X_PRE_LIBS -lX11" [AC_MSG_ERROR(No X11 installed)], $X_EXTRA_LIBS) AC_SUBST(x_libs) @@ -20,27 +38,27 @@ AC_DEFUN([GNOME_X_CHECKS], AC_CHECK_LIB(Xext, XShmAttach, x_libs="$x_libs -lXext", , - $x_libs) + $x_libs $X_EXTRA_LIBS) + x_libs="$x_libs $X_EXTRA_LIBS" gnome_cv_passdown_x_libs="$x_libs" gnome_cv_passdown_X_LIBS="$X_LIBS" gnome_cv_passdown_X_CFLAGS="$X_CFLAGS" LDFLAGS="$saved_ldflags $X_LDFLAGS $X_LIBS" - dnl Assume that if we have -lSM then we also have -lICE. + GNOME_HAVE_SM=true case "$x_libs" in *-lSM*) - # Already found it. + dnl Already found it. AC_DEFINE(HAVE_LIBSM) ;; *) + dnl Assume that if we have -lSM then we also have -lICE. AC_CHECK_LIB(SM, SmcSaveYourselfDone, [AC_DEFINE(HAVE_LIBSM) - x_libs="$x_libs -lSM -lICE"], , + x_libs="$x_libs -lSM -lICE"],GNOME_HAVE_SM=false, $x_libs -lICE) - AM_CONDITIONAL(ENABLE_GSM, - test "x$ac_cv_lib_SM_SmcSaveYourselfDone" = "xyes") ;; esac @@ -57,8 +75,7 @@ AC_DEFUN([GNOME_X_CHECKS], AC_SUBST(XPM_LIBS) AC_REQUIRE([GNOME_PTHREAD_CHECK]) - - CFLAGS="$saved_cflags $X_CFLAGS" LDFLAGS="$saved_ldflags" + AC_PROVIDE([GNOME_X_CHECKS]) ]) |