]> git.saurik.com Git - wxWidgets.git/blobdiff - wxwin.m4
Lots of docstring fixes and additions
[wxWidgets.git] / wxwin.m4
index d0415b928402afcbabb6ef5006b2b819e0c491c9..c287fc609db9aa9ad07b8b51850a5e98967239b6 100644 (file)
--- a/wxwin.m4
+++ b/wxwin.m4
@@ -98,6 +98,9 @@ AC_DEFUN([AM_PATH_WXCONFIG],
      wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
      WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
   fi
+  if test "$cross_compiling" = "yes"; then
+     wx_config_args="$wx_config_args --host=$host_alias"
+  fi
 
   dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
   if test -x "$WX_CONFIG_NAME" ; then
@@ -110,7 +113,6 @@ AC_DEFUN([AM_PATH_WXCONFIG],
 
   if test "$WX_CONFIG_PATH" != "no" ; then
     WX_VERSION=""
-    no_wx=""
 
     min_wx_version=ifelse([$1], ,2.2.1,$1)
     if test -z "$5" ; then
@@ -155,11 +157,22 @@ AC_DEFUN([AM_PATH_WXCONFIG],
       fi
     fi
 
-    if test "x$wx_ver_ok" = x ; then
-      no_wx=yes
-    else
+    if test -n "$wx_ver_ok"; then
+
+      AC_MSG_RESULT(yes (version $WX_VERSION))
       WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
-      WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs`
+
+      dnl is this even still appropriate?  --static is a real option now
+      dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
+      dnl what the user actually wants, making this redundant at best.
+      dnl For now keep it in case anyone actually used it in the past.
+      AC_MSG_CHECKING([for wxWindows static library])
+      WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null`
+      if test "x$WX_LIBS_STATIC" = "x"; then
+        AC_MSG_RESULT(no)
+      else
+        AC_MSG_RESULT(yes)
+      fi
 
       dnl starting with version 2.2.6 wx-config has --cppflags argument
       wx_has_cppflags=""
@@ -196,12 +209,11 @@ AC_DEFUN([AM_PATH_WXCONFIG],
          WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
          WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
       fi
-    fi
 
-    if test "x$no_wx" = x ; then
-       AC_MSG_RESULT(yes (version $WX_VERSION))
-       ifelse([$2], , :, [$2])
+      ifelse([$2], , :, [$2])
+
     else
+
        if test "x$WX_VERSION" = x; then
           dnl no wx-config at all
           AC_MSG_RESULT(no)
@@ -215,6 +227,7 @@ AC_DEFUN([AM_PATH_WXCONFIG],
        WX_LIBS=""
        WX_LIBS_STATIC=""
        ifelse([$3], , :, [$3])
+
     fi
   fi