Commit b6c4b865 authored by User's avatar User

Revert "Update gettext"

This reverts commit 8b71b104.
Most developers did not update their gettext install
Bumping gettext requirement is useless.
parent 77f7cdd4
...@@ -393,7 +393,7 @@ lt_cv_deplibs_check_method=pass_all ...@@ -393,7 +393,7 @@ lt_cv_deplibs_check_method=pass_all
dnl dnl
dnl Gettext stuff dnl Gettext stuff
dnl dnl
AM_GNU_GETTEXT_VERSION(0.17) AM_GNU_GETTEXT_VERSION(0.16.1)
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}]) VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}])
......
# gettext.m4 serial 60 (gettext-0.17) # gettext.m4 serial 59 (gettext-0.16.1)
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
...@@ -362,6 +362,44 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a ...@@ -362,6 +362,44 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
]) ])
dnl Checks for special options needed on MacOS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
[CFPreferencesCopyAppValue(NULL, NULL)],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
m4_define([gt_NEEDS_INIT], m4_define([gt_NEEDS_INIT],
[ [
......
# iconv.m4 serial AM6 (gettext-0.17) # iconv.m4 serial AM4 (gettext-0.11.3)
dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
...@@ -21,7 +21,6 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -21,7 +21,6 @@ AC_DEFUN([AM_ICONV_LINK],
[ [
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed). dnl those with the standalone portable GNU libiconv installed).
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly. dnl accordingly.
...@@ -34,7 +33,7 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -34,7 +33,7 @@ AC_DEFUN([AM_ICONV_LINK],
am_save_CPPFLAGS="$CPPFLAGS" am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h> AC_TRY_LINK([#include <stdlib.h>
...@@ -57,85 +56,7 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -57,85 +56,7 @@ AC_DEFUN([AM_ICONV_LINK],
fi fi
]) ])
if test "$am_cv_func_iconv" = yes; then if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
AC_TRY_RUN([
#include <iconv.h>
#include <string.h>
int main ()
{
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
return 1;
}
}
#endif
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
provided. */
if (/* Try standardized names. */
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
/* Try IRIX, OSF/1 names. */
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
/* Try AIX names. */
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
return 1;
return 0;
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
[case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac])
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
esac
else
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1,
[Define if you have the iconv() function and it works.])
fi fi
if test "$am_cv_lib_iconv" = yes; then if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_CHECKING([how to link with libiconv])
......
# intdiv0.m4 serial 2 (gettext-0.17) # intdiv0.m4 serial 1 (gettext-0.11.3)
dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
...@@ -14,27 +14,16 @@ AC_DEFUN([gt_INTDIV0], ...@@ -14,27 +14,16 @@ AC_DEFUN([gt_INTDIV0],
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
gt_cv_int_divbyzero_sigfpe, gt_cv_int_divbyzero_sigfpe,
[ [
gt_cv_int_divbyzero_sigfpe= AC_TRY_RUN([
changequote(,)dnl
case "$host_os" in
macos* | darwin[6-9]* | darwin[1-9][0-9]*)
# On MacOS X 10.2 or newer, just assume the same as when cross-
# compiling. If we were to perform the real test, 1 Crash Report
# dialog window would pop up.
case "$host_cpu" in
i[34567]86 | x86_64)
gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
esac
;;
esac
changequote([,])dnl
if test -z "$gt_cv_int_divbyzero_sigfpe"; then
AC_TRY_RUN([
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
static void static void
#ifdef __cplusplus
sigfpe_handler (int sig) sigfpe_handler (int sig)
#else
sigfpe_handler (sig) int sig;
#endif
{ {
/* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
exit (sig != SIGFPE); exit (sig != SIGFPE);
...@@ -62,18 +51,15 @@ int main () ...@@ -62,18 +51,15 @@ int main ()
exit (1); exit (1);
} }
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
[ [
# Guess based on the CPU. # Guess based on the CPU.
changequote(,)dnl case "$host_cpu" in
case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*)
alpha* | i[34567]86 | x86_64 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";;
gt_cv_int_divbyzero_sigfpe="guessing yes";; *)
*) gt_cv_int_divbyzero_sigfpe="guessing no";;
gt_cv_int_divbyzero_sigfpe="guessing no";; esac
esac ])
changequote([,])dnl
])
fi
]) ])
case "$gt_cv_int_divbyzero_sigfpe" in case "$gt_cv_int_divbyzero_sigfpe" in
*yes) value=1;; *yes) value=1;;
......
# intl.m4 serial 8 (gettext-0.17) # intl.m4 serial 3 (gettext-0.16)
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
...@@ -33,6 +33,7 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -33,6 +33,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
AC_REQUIRE([gl_VISIBILITY])dnl AC_REQUIRE([gl_VISIBILITY])dnl
AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
...@@ -97,7 +98,7 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -97,7 +98,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
dnl exported variables _also_ in the static library. dnl exported variables _also_ in the static library.
if test "$enable_shared" = yes; then if test "$enable_shared" = yes; then
case "$host_os" in case "$host_os" in
mingw* | cygwin*) is_woe32dll=yes ;; cygwin*) is_woe32dll=yes ;;
*) is_woe32dll=no ;; *) is_woe32dll=no ;;
esac esac
else else
...@@ -106,31 +107,6 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -106,31 +107,6 @@ AC_DEFUN([AM_INTL_SUBDIR],
WOE32DLL=$is_woe32dll WOE32DLL=$is_woe32dll
AC_SUBST([WOE32DLL]) AC_SUBST([WOE32DLL])
dnl On mingw and Cygwin, we can activate special Makefile rules which add
dnl version information to the shared libraries and executables.
case "$host_os" in
mingw* | cygwin*) is_woe32=yes ;;
*) is_woe32=no ;;
esac
WOE32=$is_woe32
AC_SUBST([WOE32])
if test $WOE32 = yes; then
dnl Check for a program that compiles Windows resource files.
AC_CHECK_TOOL([WINDRES], [windres])
fi
dnl Determine whether when creating a library, "-lc" should be passed to
dnl libtool or not. On many platforms, it is required for the libtool option
dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
dnl in the *.la files - makes it impossible to create multithreaded programs,
dnl because libtool also reorders the -lc to come before the -pthread, and
dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
case "$host_os" in
hpux*) LTLIBC="" ;;
*) LTLIBC="-lc" ;;
esac
AC_SUBST([LTLIBC])
dnl Rename some macros and functions used for locking. dnl Rename some macros and functions used for locking.
AH_BOTTOM([ AH_BOTTOM([
#define __libc_lock_t gl_lock_t #define __libc_lock_t gl_lock_t
...@@ -221,9 +197,7 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], ...@@ -221,9 +197,7 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
[AC_TRY_LINK([#include <langinfo.h> [AC_TRY_LINK([#include <langinfo.h>
#include <locale.h>], #include <locale.h>],
[char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES)); [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
return !cs;
],
gt_cv_nl_locale_name=yes, gt_cv_nl_locale_name=yes,
gt_cv_nl_locale_name=no) gt_cv_nl_locale_name=no)
]) ])
......
# lib-link.m4 serial 13 (gettext-0.17) # lib-link.m4 serial 9 (gettext-0.16)
dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible. dnl From Bruno Haible.
AC_PREREQ(2.54) AC_PREREQ(2.50)
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies. dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
dnl augments the CPPFLAGS variable. dnl augments the CPPFLAGS variable.
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS], AC_DEFUN([AC_LIB_LINKFLAGS],
[ [
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
...@@ -26,16 +24,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS], ...@@ -26,16 +24,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_libs="$LIB[]NAME"
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
]) ])
LIB[]NAME="$ac_cv_lib[]Name[]_libs" LIB[]NAME="$ac_cv_lib[]Name[]_libs"
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
INC[]NAME="$ac_cv_lib[]Name[]_cppflags" INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_SUBST([LIB]NAME) AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME) AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency. dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes HAVE_LIB[]NAME=yes
...@@ -51,8 +46,6 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and ...@@ -51,8 +46,6 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[ [
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
...@@ -89,23 +82,17 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], ...@@ -89,23 +82,17 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
CPPFLAGS="$ac_save_CPPFLAGS" CPPFLAGS="$ac_save_CPPFLAGS"
LIB[]NAME= LIB[]NAME=
LTLIB[]NAME= LTLIB[]NAME=
LIB[]NAME[]_PREFIX=
fi fi
AC_SUBST([HAVE_LIB]NAME) AC_SUBST([HAVE_LIB]NAME)
AC_SUBST([LIB]NAME) AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME) AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
undefine([Name]) undefine([Name])
undefine([NAME]) undefine([NAME])
]) ])
dnl Determine the platform dependent parameters needed to use rpath: dnl Determine the platform dependent parameters needed to use rpath:
dnl acl_libext, dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
dnl acl_shlibext, dnl hardcode_direct, hardcode_minus_L.
dnl acl_hardcode_libdir_flag_spec,
dnl acl_hardcode_libdir_separator,
dnl acl_hardcode_direct,
dnl acl_hardcode_minus_L.
AC_DEFUN([AC_LIB_RPATH], AC_DEFUN([AC_LIB_RPATH],
[ [
dnl Tell automake >= 1.10 to complain if config.rpath is missing. dnl Tell automake >= 1.10 to complain if config.rpath is missing.
...@@ -122,14 +109,12 @@ AC_DEFUN([AC_LIB_RPATH], ...@@ -122,14 +109,12 @@ AC_DEFUN([AC_LIB_RPATH],
acl_cv_rpath=done acl_cv_rpath=done
]) ])
wl="$acl_cv_wl" wl="$acl_cv_wl"
acl_libext="$acl_cv_libext" libext="$acl_cv_libext"
acl_shlibext="$acl_cv_shlibext" shlibext="$acl_cv_shlibext"
acl_libname_spec="$acl_cv_libname_spec" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
acl_library_names_spec="$acl_cv_library_names_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_direct="$acl_cv_hardcode_direct"
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_minus_L="$acl_cv_hardcode_minus_L"
acl_hardcode_direct="$acl_cv_hardcode_direct"
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
dnl Determine whether the user wants rpath handling at all. dnl Determine whether the user wants rpath handling at all.
AC_ARG_ENABLE(rpath, AC_ARG_ENABLE(rpath,
[ --disable-rpath do not hardcode runtime library paths], [ --disable-rpath do not hardcode runtime library paths],
...@@ -139,24 +124,20 @@ AC_DEFUN([AC_LIB_RPATH], ...@@ -139,24 +124,20 @@ AC_DEFUN([AC_LIB_RPATH],
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies. dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY], AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[ [
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Autoconf >= 2.61 supports dots in --with options.
define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
dnl By default, look in $includedir and $libdir. dnl By default, look in $includedir and $libdir.
use_additional=yes use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([ AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\" eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\" eval additional_libdir=\"$libdir\"
]) ])
AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], AC_LIB_ARG_WITH([lib$1-prefix],
[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
--without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
[ [
if test "X$withval" = "Xno"; then if test "X$withval" = "Xno"; then
use_additional=no use_additional=no
...@@ -177,7 +158,6 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ...@@ -177,7 +158,6 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LIB[]NAME= LIB[]NAME=
LTLIB[]NAME= LTLIB[]NAME=
INC[]NAME= INC[]NAME=
LIB[]NAME[]_PREFIX=
rpathdirs= rpathdirs=
ltrpathdirs= ltrpathdirs=
names_already_handled= names_already_handled=
...@@ -217,53 +197,27 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ...@@ -217,53 +197,27 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
found_la= found_la=
found_so= found_so=
found_a= found_a=
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
if test -n "$acl_shlibext"; then
shrext=".$acl_shlibext" # typically: shrext=.so
else
shrext=
fi
if test $use_additional = yes; then if test $use_additional = yes; then
dir="$additional_libdir" if test -n "$shlibext" \
dnl The same code as in the loop below: && { test -f "$additional_libdir/lib$name.$shlibext" \
dnl First look for a shared library. || { test "$shlibext" = dll \
if test -n "$acl_shlibext"; then && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
if test -f "$dir/$libname$shrext"; then found_dir="$additional_libdir"
found_dir="$dir" if test -f "$additional_libdir/lib$name.$shlibext"; then
found_so="$dir/$libname$shrext" found_so="$additional_libdir/lib$name.$shlibext"
else else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then found_so="$additional_libdir/lib$name.dll.a"
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
fi
done
fi
fi fi
fi if test -f "$additional_libdir/lib$name.la"; then
dnl Then look for a static library. found_la="$additional_libdir/lib$name.la"
if test "X$found_dir" = "X"; then
if test -f "$dir/$libname.$acl_libext"; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi fi
fi else
if test "X$found_dir" != "X"; then if test -f "$additional_libdir/lib$name.$libext"; then
if test -f "$dir/$libname.la"; then found_dir="$additional_libdir"
found_la="$dir/$libname.la" found_a="$additional_libdir/lib$name.$libext"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
fi fi
fi fi
fi fi
...@@ -273,44 +227,26 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ...@@ -273,44 +227,26 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$x" in case "$x" in
-L*) -L*)
dir=`echo "X$x" | sed -e 's/^X-L//'` dir=`echo "X$x" | sed -e 's/^X-L//'`
dnl First look for a shared library. if test -n "$shlibext" \
if test -n "$acl_shlibext"; then && { test -f "$dir/lib$name.$shlibext" \
if test -f "$dir/$libname$shrext"; then || { test "$shlibext" = dll \
found_dir="$dir" && test -f "$dir/lib$name.dll.a"; }; }; then
found_so="$dir/$libname$shrext" found_dir="$dir"
if test -f "$dir/lib$name.$shlibext"; then
found_so="$dir/lib$name.$shlibext"
else else
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then found_so="$dir/lib$name.dll.a"
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
| sed 1q ) 2>/dev/null`
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
found_dir="$dir"
found_so="$dir/$libname$shrext.$ver"
fi
else
eval library_names=\"$acl_library_names_spec\"
for f in $library_names; do
if test -f "$dir/$f"; then