]> git.saurik.com Git - wxWidgets.git/blobdiff - wxwin.m4
-o flag must be after PIC flag for gcc under HPUX
[wxWidgets.git] / wxwin.m4
index cad993397413b96ffa917f22fd1c4fcb62a9c06f..b5959a33836e60108e9dcc0fc63f2b71f48f8d59 100644 (file)
--- a/wxwin.m4
+++ b/wxwin.m4
@@ -7,7 +7,7 @@ dnl     ...
 dnl    AM_OPTIONS_WXCONFIG
 dnl    ...
 dnl    ...
 dnl    AM_OPTIONS_WXCONFIG
 dnl    ...
 dnl    ...
-dnl    AM_PATH_WXCONFIG(2.3.2, wxWin=1)
+dnl    AM_PATH_WXCONFIG(2.3.3, wxWin=1)
 dnl     if test "$wxWin" != 1; then
 dnl        AC_MSG_ERROR([
 dnl               wxWindows must be installed on your system
 dnl     if test "$wxWin" != 1; then
 dnl        AC_MSG_ERROR([
 dnl               wxWindows must be installed on your system
@@ -16,7 +16,7 @@ dnl
 dnl               Please check that wx-config is in path, the directory
 dnl               where wxWindows libraries are installed (returned by
 dnl               'wx-config --libs' command) is in LD_LIBRARY_PATH or
 dnl               Please check that wx-config is in path, the directory
 dnl               where wxWindows libraries are installed (returned by
 dnl               'wx-config --libs' command) is in LD_LIBRARY_PATH or
-dnl               equivalent variable and wxWindows version is 2.3.2 or above.
+dnl               equivalent variable and wxWindows version is 2.3.3 or above.
 dnl        ])
 dnl     fi
 dnl     CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
 dnl        ])
 dnl     fi
 dnl     CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
@@ -39,7 +39,7 @@ AC_DEFUN(AM_OPTIONS_WXCONFIG,
                wx_config_prefix="$withval", wx_config_prefix="")
    AC_ARG_WITH(wx-exec-prefix,[  --with-wx-exec-prefix=PREFIX Exec prefix where wxWindows is installed (optional)],
                wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
                wx_config_prefix="$withval", wx_config_prefix="")
    AC_ARG_WITH(wx-exec-prefix,[  --with-wx-exec-prefix=PREFIX Exec prefix where wxWindows is installed (optional)],
                wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
-   AC_ARG_WITH(wx-exec-prefix,[  --with-wx-config=CONFIG   wx-config script to use (optional)],
+   AC_ARG_WITH(wx-config,[  --with-wx-config=CONFIG   wx-config script to use (optional)],
                wx_config_name="$withval", wx_config_name="")
 ])
 
                wx_config_name="$withval", wx_config_name="")
 ])
 
@@ -69,20 +69,20 @@ AC_DEFUN(AM_PATH_WXCONFIG,
   dnl deal with optional prefixes
   if test x$wx_config_exec_prefix != x ; then
      wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
   dnl deal with optional prefixes
   if test x$wx_config_exec_prefix != x ; then
      wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
-     if test x${WX_CONFIG_NAME+set} != xset ; then
-        WX_CONFIG_PATH=$wx_config_exec_prefix/bin/$WX_CONFIG_NAME
-     fi
+     WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
   fi
   if test x$wx_config_prefix != x ; then
      wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
   fi
   if test x$wx_config_prefix != x ; then
      wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
-     if test x${WX_CONFIG_NAME+set} != xset ; then
-        WX_CONFIG_PATH=$wx_config_prefix/bin/$WX_CONFIG_NAME
-     fi
+     WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
   fi
 
   fi
 
-  dnl don't search the PATH if we already have the full name
-  if test "x$WX_CONFIG_PATH" = "x" ; then
-    AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no)
+  dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
+  if test -x "$WX_CONFIG_NAME" ; then
+     AC_MSG_CHECKING(for wx-config)
+     WX_CONFIG_PATH="$WX_CONFIG_NAME"
+     AC_MSG_RESULT($WX_CONFIG_PATH)
+  else
+     AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
   fi
 
   if test "$WX_CONFIG_PATH" != "no" ; then
   fi
 
   if test "$WX_CONFIG_PATH" != "no" ; then