From: Michael Wetherell Date: Wed, 31 Aug 2005 20:22:49 +0000 (+0000) Subject: Fix for detection of motif headers when they are in a different place to X11, X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e051b34ef21116037a84f194ef9b0232007e8717 Fix for detection of motif headers when they are in a different place to X11, 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 --- diff --git a/configure b/configure index db383acfbe..3fe7c3cd46 100755 --- a/configure +++ b/configure @@ -22049,6 +22049,8 @@ SEARCH_INCLUDE="\ /usr/x386/include \ /usr/XFree86/include/X11 \ \ + /usr/pkg/include \ + \ 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 + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" + 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: 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 + + CFLAGS=$save_CFLAGS fi if test "$COMPILED_X_PROGRAM" = 0; then diff --git a/configure.in b/configure.in index 770fd5584d..896396cfaa 100644 --- a/configure.in +++ b/configure.in @@ -2112,6 +2112,8 @@ SEARCH_INCLUDE="\ /usr/x386/include \ /usr/XFree86/include/X11 \ \ + /usr/pkg/include \ + \ 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 + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" + AC_TRY_COMPILE( [ #include @@ -3061,9 +3066,11 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config ], [ 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