]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Fix compilation errors due to recent typedef changes
[wxWidgets.git] / configure.in
index 9066650376e0af56ad98be512800f9a31482ffdf..0b43af54ec0b531d47c880c73b8516f99666ac34 100644 (file)
@@ -1347,6 +1347,18 @@ AC_PROG_CXX
 
 AC_LANG_RESTORE
 
 
 AC_LANG_RESTORE
 
+dnl check if compiler includes /usr/local/include in
+dnl default include files search path.
+AC_MSG_CHECKING([for /usr/local/include in default include path])
+GCC_SEARCHES_USR_LOCAL_INCLUDE="no"
+if test "$GCC" = "yes" ; then
+  echo | gcc -v -x c++ -E - 2>&1 | sed -n '/^#include </,$p' | \
+       sed -n '1,/End of search list\./p' | \
+        grep '^ */usr/local/include$' 2>&1 /dev/null \
+  && GCC_SEARCHES_USR_LOCAL_INCLUDE="yes"
+fi
+AC_MSG_RESULT([$GCC_SEARCHES_USR_LOCAL_INCLUDE])
+
 dnl ranlib command
 dnl   defines RANLIB with the appropriate command
 AC_PROG_RANLIB
 dnl ranlib command
 dnl   defines RANLIB with the appropriate command
 AC_PROG_RANLIB
@@ -1464,15 +1476,20 @@ fi dnl not GNU make
 dnl needed for making link to setup.h
 AC_PROG_LN_S
 
 dnl needed for making link to setup.h
 AC_PROG_LN_S
 
-dnl ---------------------------------------------------------------------------
-dnl When we are using gcc on OS/2, we want to be either using resources (PM)
-dnl or a more complete POSIX emulation for Motif/GTK+/X11
-dnl Moreover we need to link explicitly against either stdcpp.a or stdcxx.a
-dnl (depending on compiler version), since we are using "gcc", not "g++/c++".
-dnl ---------------------------------------------------------------------------
-dnl (OS/2-only piece)
+dnl ------------------------------------------------------------------------
+dnl Platform specific tests
+dnl ------------------------------------------------------------------------
+
 case "${host}" in
   *-pc-os2_emx | *-pc-os2-emx )
 case "${host}" in
   *-pc-os2_emx | *-pc-os2-emx )
+      dnl ---------------------------------------------------------------------
+      dnl When we are using gcc on OS/2, we want to be either using resources
+      dnl (PM) or a more complete POSIX emulation for Motif/GTK+/X11.
+      dnl Moreover we need to link explicitly against either stdcpp.a or
+      dnl stdcxx.a (depending on compiler version), since we are using "gcc",
+      dnl not "g++/c++".
+      dnl ---------------------------------------------------------------------
+      dnl (OS/2-only piece)
       if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
           dnl More complete Unix emulation for unix-like ports
           dnl by linking in POSIX/2's cExt (if available).
       if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
           dnl More complete Unix emulation for unix-like ports
           dnl by linking in POSIX/2's cExt (if available).
@@ -1501,53 +1518,61 @@ case "${host}" in
       else
           LIBS="$LIBS -lstdcxx"
       fi
       else
           LIBS="$LIBS -lstdcxx"
       fi
+      dnl (end of OS/2-only piece)
   ;;
   ;;
-esac
-dnl (end of OS/2-only piece)
+  *)
+      dnl ---------------------------------------------------------------------
+      dnl look for strcasecmp() in string.h and then strings.h if it's not
+      dnl there. Don't do this on OS/2, where "stricmp" is the function to be
+      dnl used.
+      dnl ---------------------------------------------------------------------
+      dnl (non-OS/2-only piece)
 
 
-dnl ------------------------------------------------------------------------
-dnl Check for headers
-dnl ------------------------------------------------------------------------
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
 
 
-dnl look for strcasecmp() in string.h and then strings.h if it's not there
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+      AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
+          AC_TRY_LINK([
+              #include <string.h>
+              ],
+              [
+                  strcasecmp("foo", "bar");
+              ],
+              ac_cv_string_strcasecmp=yes,
+              ac_cv_string_strcasecmp=no
+          )
+      ])
 
 
-AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
-    AC_TRY_LINK([
-        #include <string.h>
-        ],
-        [
-            strcasecmp("foo", "bar");
-        ],
-        ac_cv_string_strcasecmp=yes,
-        ac_cv_string_strcasecmp=no
-    )
-])
+      if test x"$ac_cv_string_strcasecmp" = "xyes"; then
+          AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H)
+      else
+          AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [
+              AC_TRY_LINK([
+                  #include <strings.h>
+                  ],
+                  [
+                      strcasecmp("foo", "bar");
+                  ],
+                  ac_cv_strings_strcasecmp=yes,
+                  ac_cv_strings_strcasecmp=no
+              )
+          ])
 
 
-if test x"$ac_cv_string_strcasecmp" = "xyes"; then
-    AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H)
-else
-    AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [
-        AC_TRY_LINK([
-            #include <strings.h>
-            ],
-            [
-                strcasecmp("foo", "bar");
-            ],
-            ac_cv_strings_strcasecmp=yes,
-            ac_cv_strings_strcasecmp=no
-        )
-    ])
+          if test x"$ac_cv_string_strcasecmp" = "xyes"; then
+              AC_DEFINE(HAVE_STRCASECMP_IN_STRINGS_H)
+          else
+              AC_MSG_ERROR([No case-insensitive string comparison function found.])
+          fi
+      fi
 
 
-    if test x"$ac_cv_string_strcasecmp" = "xyes"; then
-        AC_DEFINE(HAVE_STRCASECMP_IN_STRINGS_H)
-    else
-        AC_MSG_ERROR([No case-insensitive string comparison function found.])
-    fi
-fi
+      AC_LANG_RESTORE
+      dnl (end of non-OS/2-only piece)
+  ;;
+esac
 
 
-AC_LANG_RESTORE
+dnl ------------------------------------------------------------------------
+dnl Check for headers
+dnl ------------------------------------------------------------------------
 
 dnl defines HAVE_STDLIB_H
 AC_CHECK_HEADERS(stdlib.h)
 
 dnl defines HAVE_STDLIB_H
 AC_CHECK_HEADERS(stdlib.h)
@@ -1831,8 +1856,13 @@ SEARCH_INCLUDE="\
                               \
     /usr/openwin/share/include"
 
                               \
     /usr/openwin/share/include"
 
+dnl prepend lib and lib32 for IRIX where the files in these directories should
+dnl be found before the ones in lib64 for 32bit compilation -- of course, this
+dnl probably/surely breaks 64bit compilation... IMO the only real solution is to
+dnl stop using WX_PATH_FIND_LIBRARIES() at all and use AC_CHECK_LIB() instead
+dnl
 dnl add 64 bit versions for Linux on AMD (this is not perfect but well...)
 dnl add 64 bit versions for Linux on AMD (this is not perfect but well...)
-SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` /usr/lib64 /usr/X11R6/lib64"
+SEARCH_LIB="/usr/lib /usr/lib32 `echo "$SEARCH_INCLUDE" | sed s/include/lib/g` /usr/lib64 /usr/X11R6/lib64"
 
 dnl ------------------------------------------------------------------------
 dnl Check for libraries
 
 dnl ------------------------------------------------------------------------
 dnl Check for libraries
@@ -1908,7 +1938,7 @@ if test "$wxUSE_REGEX" != "no"; then
     AC_DEFINE(wxUSE_REGEX)
             
     if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then
     AC_DEFINE(wxUSE_REGEX)
             
     if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then
-        AC_MSG_WARN([Unicode build requires built-in regex library, will use it instead])
+        AC_MSG_WARN([Defaulting to the the builtin regex library for Unicode build.])
         wxUSE_REGEX=builtin
     fi
 
         wxUSE_REGEX=builtin
     fi
 
@@ -1927,6 +1957,8 @@ if test "$wxUSE_REGEX" != "no"; then
         else
             dnl we are using the system library
             wxUSE_REGEX=sys
         else
             dnl we are using the system library
             wxUSE_REGEX=sys
+            dnl only the built-in supports advanced REs
+            AC_DEFINE(WX_NO_REGEX_ADVANCED)
         fi
     fi
 fi
         fi
     fi
 fi
@@ -5334,7 +5366,7 @@ if test "$wxUSE_TEXTCTRL" = "yes"; then
 fi
 
 if test "$wxUSE_TOGGLEBTN" = "yes"; then
 fi
 
 if test "$wxUSE_TOGGLEBTN" = "yes"; then
-    if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then
+    if test "$wxUSE_COCOA" = 1 ; then
         AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
         wxUSE_TOGGLEBTN=no
     fi
         AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
         wxUSE_TOGGLEBTN=no
     fi
@@ -5777,7 +5809,7 @@ WXCONFIG_EXTRALIBS="$LIBS"
 
 dnl wx-config must output builtin 3rd party libs in --libs in static build:
 if test "$wxUSE_REGEX" = "builtin" ; then
 
 dnl wx-config must output builtin 3rd party libs in --libs in static build:
 if test "$wxUSE_REGEX" = "builtin" ; then
-    wxconfig_3rdparty="$wxconfig_3rdparty regex"
+    wxconfig_3rdparty="$wxconfig_3rdparty regex${lib_unicode_suffix}"
 fi
 if test "$wxUSE_EXPAT" = "builtin" ; then
     wxconfig_3rdparty="$wxconfig_3rdparty expat"
 fi
 if test "$wxUSE_EXPAT" = "builtin" ; then
     wxconfig_3rdparty="$wxconfig_3rdparty expat"
@@ -6003,6 +6035,7 @@ AC_SUBST(MACRESWXCONFIG)
 
 dnl other tools
 AC_SUBST(GCC)
 
 dnl other tools
 AC_SUBST(GCC)
+AC_SUBST(GCC_SEARCHES_USR_LOCAL_INCLUDE)
 AC_SUBST(DLLTOOL)
 AC_SUBST(AS)
 AC_SUBST(NM)
 AC_SUBST(DLLTOOL)
 AC_SUBST(AS)
 AC_SUBST(NM)