From 72e4e6a397fd04e6d8e0cc5ae22aaba740c3c8bc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Sep 2005 01:10:16 +0000 Subject: [PATCH] cache results of Motif 2 and Motif-is-Lesstif tests git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure.in | 71 +++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/configure.in b/configure.in index 46d24a775c..1f4a71bb13 100644 --- a/configure.in +++ b/configure.in @@ -3165,41 +3165,44 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" - AC_MSG_CHECKING([for Motif 2]) - AC_TRY_COMPILE([ - #include - ], - [ - #if XmVersion < 2000 - Not Motif 2 - #endif - ], - [ - AC_DEFINE(__WXMOTIF20__,1) - AC_MSG_RESULT([found]) - ], - [ - AC_DEFINE(__WXMOTIF20__,0) - AC_MSG_RESULT([not found]) - ]) - AC_MSG_CHECKING([whether Motif is Lesstif]) - AC_TRY_COMPILE([ - #include - ], - [ - #if !defined(LesstifVersion) || LesstifVersion <= 0 - Not Lesstif - #endif - ], - [ - AC_DEFINE(__WXLESSTIF__,1) - AC_MSG_RESULT([yes]) - ], - [ - AC_DEFINE(__WXLESSTIF__,0) - AC_MSG_RESULT([no]) - ]) + AC_CACHE_CHECK([for Motif 2], + wx_cv_lib_motif2, + AC_TRY_COMPILE([ + #include + ], + [ + #if XmVersion < 2000 + Not Motif 2 + #endif + ], + wx_cv_lib_motif2="yes", + wx_cv_lib_motif2="no")) + if test "$wx_cv_lib_motif2" = "yes"; then + AC_DEFINE(__WXMOTIF20__,1) + else + AC_DEFINE(__WXMOTIF20__,0) + fi + + AC_CACHE_CHECK([whether Motif is Lesstif], + wx_cv_lib_lesstif, + AC_TRY_COMPILE([ + #include + ], + [ + #if !defined(LesstifVersion) || LesstifVersion <= 0 + Not Lesstif + #endif + ], + wx_cv_lib_lesstif="yes", + wx_cv_lib_lesstif="no") + ) + if test "$wx_cv_lib_lesstif" = "yes"; then + AC_DEFINE(__WXLESSTIF__,1) + else + AC_DEFINE(__WXLESSTIF__,0) + fi + CFLAGS=$save_CFLAGS GUI_TK_LIBRARY="$GUI_TK_LIBRARY${libsgm_link} -lXm${libp_link} -lXmu -lXext -lXt${libsm_ice_link} -lX11"