]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for detection of motif headers when they are in a different place to X11,
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 31 Aug 2005 20:22:49 +0000 (20:22 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 31 Aug 2005 20:22:49 +0000 (20:22 +0000)
correct error message (CPPFLAGS instead of CFLAGS) and add /usr/pkg/include
to SEARCH_INCLUDE (usual location on NetBSD).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index db383acfbe4aa1a6e5bb0e1d3a20f79530b8b7d6..3fe7c3cd465b6a7b37c67bfbe37953a8883b3b44 100755 (executable)
--- a/configure
+++ b/configure
@@ -22049,6 +22049,8 @@ SEARCH_INCLUDE="\
     /usr/x386/include         \
     /usr/XFree86/include/X11  \
                               \
     /usr/x386/include         \
     /usr/XFree86/include/X11  \
                               \
+    /usr/pkg/include          \
+                              \
     X:/XFree86/include        \
     X:/XFree86/include/X11    \
                               \
     X:/XFree86/include        \
     X:/XFree86/include/X11    \
                               \
@@ -27836,6 +27838,9 @@ echo "${ECHO_T}found in $ac_find_includes" >&6
 
             TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
         else
 
             TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
         else
+            save_CFLAGS=$CFLAGS
+            CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+
             cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
             cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27889,13 +27894,15 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
                     echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 
                     echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
-                    { { echo "$as_me:$LINENO: error: please set CFLAGS to contain the location of Xm/Xm.h" >&5
-echo "$as_me: error: please set CFLAGS to contain the location of Xm/Xm.h" >&2;}
+                    { { echo "$as_me:$LINENO: error: please set CPPFLAGS to contain the location of Xm/Xm.h" >&5
+echo "$as_me: error: please set CPPFLAGS to contain the location of Xm/Xm.h" >&2;}
    { (exit 1); exit 1; }; }
 
 
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    { (exit 1); exit 1; }; }
 
 
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            CFLAGS=$save_CFLAGS
         fi
 
         if test "$COMPILED_X_PROGRAM" = 0; then
         fi
 
         if test "$COMPILED_X_PROGRAM" = 0; then
index 770fd5584dd73432addb9d05a3092e1a8714b274..896396cfaa4b06167541356517f87973ec1c5cc4 100644 (file)
@@ -2112,6 +2112,8 @@ SEARCH_INCLUDE="\
     /usr/x386/include         \
     /usr/XFree86/include/X11  \
                               \
     /usr/x386/include         \
     /usr/XFree86/include/X11  \
                               \
+    /usr/pkg/include          \
+                              \
     X:/XFree86/include        \
     X:/XFree86/include/X11    \
                               \
     X:/XFree86/include        \
     X:/XFree86/include/X11    \
                               \
@@ -3047,6 +3049,9 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
             WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
             TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
         else
             WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
             TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
         else
+            save_CFLAGS=$CFLAGS
+            CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+
             AC_TRY_COMPILE(
                 [
                     #include <Xm/Xm.h>
             AC_TRY_COMPILE(
                 [
                     #include <Xm/Xm.h>
@@ -3061,9 +3066,11 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
                 ],
                 [
                     AC_MSG_RESULT(no)
                 ],
                 [
                     AC_MSG_RESULT(no)
-                    AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h)
+                    AC_MSG_ERROR(please set CPPFLAGS to contain the location of Xm/Xm.h)
                 ]
             )
                 ]
             )
+
+            CFLAGS=$save_CFLAGS
         fi
 
         if test "$COMPILED_X_PROGRAM" = 0; then
         fi
 
         if test "$COMPILED_X_PROGRAM" = 0; then