-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 call WX_PATH_FIND_LIBRARIES(lib name, [optional extra search paths])
+dnl sets ac_find_libraries to the full name of the file that was found
+dnl or leaves it empty if not found
dnl ---------------------------------------------------------------------------
AC_DEFUN([WX_PATH_FIND_LIBRARIES],
[
ac_find_libraries=
dnl ---------------------------------------------------------------------------
AC_DEFUN([WX_PATH_FIND_LIBRARIES],
[
ac_find_libraries=
dnl suppress PKG_PROG_PKG_CONFIG output; we don't want to keep seeing it
PKG_PROG_PKG_CONFIG() AS_MESSAGE_FD> /dev/null
dnl suppress PKG_PROG_PKG_CONFIG output; we don't want to keep seeing it
PKG_PROG_PKG_CONFIG() AS_MESSAGE_FD> /dev/null
- dnl AS_VAR_COPY([ac_find_cflags], [$2_CFLAGS])
- dnl AS_VAR_COPY([fl_libs], [$2_LIBS])
- eval ac_find_cflags=\$$2_CFLAGS
- eval fl_libs=\$$2_LIBS
+ dnl AS_VAR_COPY([ac_find_cflags], [$1_CFLAGS])
+ dnl AS_VAR_COPY([fl_libs], [$1_LIBS])
+ eval ac_find_cflags=\$$1_CFLAGS
+ eval fl_libs=\$$1_LIBS
dnl fl_libs may now contain -Lfoopath -lfoo (only non-standard paths are
dnl added) We only want the path bit, not the lib names
dnl fl_libs may now contain -Lfoopath -lfoo (only non-standard paths are
dnl added) We only want the path bit, not the lib names
[
if test "x$ac_find_libraries" = "x"; then
dnl Next with AC_CHECK_LIB, if a test function was provided
[
if test "x$ac_find_libraries" = "x"; then
dnl Next with AC_CHECK_LIB, if a test function was provided
- if test "x$3" != "x"; then
- AC_CHECK_LIB([$2], [$3], [ac_find_libraries="std"])
+ if test "x$2" != "x"; then
+ AC_CHECK_LIB([$1], [$2], [ac_find_libraries="std"])
dnl Finally try the search path
dnl Output a message again, as AC_CHECK_LIB will just have said "no"
AC_MSG_CHECKING([elsewhere])
dnl Finally try the search path
dnl Output a message again, as AC_CHECK_LIB will just have said "no"
AC_MSG_CHECKING([elsewhere])