]> git.saurik.com Git - wxWidgets.git/blobdiff - acinclude.m4
ported KO's v262 change forward
[wxWidgets.git] / acinclude.m4
index 817275d7f40124da49806e53cb03836133e42020..4f4ecb9682151821e5cc7eb2ee7862134db23318 100644 (file)
@@ -43,9 +43,10 @@ for ac_dir in $1 /usr/include;
 ])
 
 dnl ---------------------------------------------------------------------------
 ])
 
 dnl ---------------------------------------------------------------------------
-dnl WX_PATH_FIND_LIBRARIES helper
+dnl call WX_PATH_FIND_LIBRARIES(search path, lib name), sets ac_find_libraries
+dnl to the full name of the file that was found or leaves it empty if not found
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_PATH_FIND_LIBRARIES_IN_PATH],
+AC_DEFUN([WX_PATH_FIND_LIBRARIES],
 [
   ac_find_libraries=
   for ac_dir in $1;
 [
   ac_find_libraries=
   for ac_dir in $1;
@@ -60,23 +61,17 @@ AC_DEFUN([WX_PATH_FIND_LIBRARIES_IN_PATH],
 ])
 
 dnl ---------------------------------------------------------------------------
 ])
 
 dnl ---------------------------------------------------------------------------
-dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_libraries
-dnl to the full name of the file that was found or leaves it empty if not found
+dnl return list of standard library paths
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
-AC_DEFUN([WX_PATH_FIND_LIBRARIES],
-[
-  dnl check in default locations first:
-  dnl   - /usr/lib: standard
-  dnl   - /usr/lib32: n32 ABI on IRIX
-  dnl   - /usr/lib64: n64 ABI on IRIX
-  dnl   - /usr/lib/64: 64 bit ABI on Solaris and Linux x86-64
-  WX_PATH_FIND_LIBRARIES_IN_PATH([/usr/lib /usr/lib32 /usr/lib/64 /usr/lib64], $2)
-  if test "$ac_find_libraries" != "" ; then
-    ac_find_libraries="default location"
-  else
-    WX_PATH_FIND_LIBRARIES_IN_PATH($1, $2)
-  fi
-])
+dnl return all default locations:
+dnl   - /usr/lib: standard
+dnl   - /usr/lib32: n32 ABI on IRIX
+dnl   - /usr/lib64: n64 ABI on IRIX
+dnl   - /usr/lib/64: 64 bit ABI on Solaris and Linux x86-64
+dnl
+dnl NB: if any of directories in the list is not a subdir of /usr, code setting
+dnl     wx_cv_std_libpath needs to be updated
+AC_DEFUN([WX_STD_LIBPATH], [/usr/lib /usr/lib32 /usr/lib/64 /usr/lib64])
 
 dnl ---------------------------------------------------------------------------
 dnl Path to include, already defined
 
 dnl ---------------------------------------------------------------------------
 dnl Path to include, already defined
@@ -340,10 +335,11 @@ AC_DEFUN([WX_ARG_SYS_WITH],
         ])
 
 dnl this macro checks for a command line argument and caches the result
         ])
 
 dnl this macro checks for a command line argument and caches the result
-dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
+dnl usage: WX_ARG_WITH(option, helpmessage, variable-name, [withstring])
 AC_DEFUN([WX_ARG_WITH],
         [
 AC_DEFUN([WX_ARG_WITH],
         [
-          AC_MSG_CHECKING([for --with-$1])
+         withstring=$4
+          AC_MSG_CHECKING([for --${withstring:-with}-$1])
           no_cache=0
           AC_ARG_WITH($1, [$2],
                       [
           no_cache=0
           AC_ARG_WITH($1, [$2],
                       [