Commit 974a399a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove the autoconf hack, fix gettext broken in b6c4b865

and fix the M4 ignore rules
parent b6c4b865
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*.dylib *.dylib
*.lo *.lo
*.la *.la
*.m4
*.mak *.mak
*.moc.cpp *.moc.cpp
*.o *.o
......
...@@ -56,17 +56,6 @@ elif test ".`uname -s`" = ".Darwin"; then ...@@ -56,17 +56,6 @@ elif test ".`uname -s`" = ".Darwin"; then
exit 1 exit 1
fi fi
# Check for autoconf
rm -f m4/autoconf260.m4
case "$(autoreconf --version|head -n 1)" in
*2.59*)
echo "Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP."
echo "Press Enter to continue"
read
cp -f extras/buildsystem/autotools/m4/autoconf260.m4 m4/
;;
esac
# Check for pkg-config # Check for pkg-config
if pkg-config --version >/dev/null 2>&1; then if pkg-config --version >/dev/null 2>&1; then
# We have pkg-config, everything is cool. # We have pkg-config, everything is cool.
......
...@@ -10,7 +10,7 @@ CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" ...@@ -10,7 +10,7 @@ CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
CODENAME="Grishenko" CODENAME="Grishenko"
COPYRIGHT_YEARS="1996-2008" COPYRIGHT_YEARS="1996-2008"
AC_PREREQ(2.59) dnl this really should be 2.59c AC_PREREQ(2.59c)
AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_BUILD AC_CANONICAL_BUILD
...@@ -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.16.1) AM_GNU_GETTEXT_VERSION(0.17)
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}]) VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}])
......
# Replacements for autoconf 2.59 and older
# Please make official source tarballs with recent autoconf only.
# Copyright (C) 2006 Rémi Denis-Courmont.
# Distribution and usage of this file, verbatim or modified, is permitted
# with no limitations.
AC_DEFUN([AC_PROG_CC_C99],
[ AC_REQUIRE([AC_PROG_CC])dnl
CC="$CC -std=gnu99"
])
AC_DEFUN([AC_PROG_OBJC], [
AC_MSG_CHECKING(for an Objective-C compiler)
OBJC="${CXX}"
AC_SUBST(OBJC)
OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
AC_SUBST(OBJCFLAGS)
])
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[ AC_DEFINE([_GNU_SOURCE], [ ], [Enable lots of stuff with glibc.])
])
gettext.m4
glibc2.m4
iconv.m4
intdiv0.m4
intl.m4
intmax.m4
lib-link.m4
lock.m4
longdouble.m4
longlong.m4
nls.m4
po.m4
printf-posix.m4
private.m4
size_max.m4
uintmax_t.m4
wchar_t.m4
wint_t.m4
xsize.m4
# gettext.m4 serial 59 (gettext-0.16.1) # gettext.m4 serial 60 (gettext-0.17)
dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl Copyright (C) 1995-2007 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,44 +362,6 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a ...@@ -362,44 +362,6 @@ 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],
[ [
......
# glibc2.m4 serial 1
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Test for the GNU C Library, version 2.0 or newer.
# From Bruno Haible.
AC_DEFUN([gt_GLIBC2],
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
ac_cv_gnu_library_2,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ >= 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2=yes,
ac_cv_gnu_library_2=no)
]
)
AC_SUBST(GLIBC2)
GLIBC2="$ac_cv_gnu_library_2"
]
)
# iconv.m4 serial AM4 (gettext-0.11.3) # iconv.m4 serial AM6 (gettext-0.17)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002, 2007 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,6 +21,7 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -21,6 +21,7 @@ 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.
...@@ -33,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -33,7 +34,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>
...@@ -56,7 +57,85 @@ AC_DEFUN([AM_ICONV_LINK], ...@@ -56,7 +57,85 @@ AC_DEFUN([AM_ICONV_LINK],
fi fi
]) ])
if test "$am_cv_func_iconv" = yes; then if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
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 1 (gettext-0.11.3) # intdiv0.m4 serial 2 (gettext-0.17)
dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl Copyright (C) 2002, 2007 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,16 +14,27 @@ AC_DEFUN([gt_INTDIV0], ...@@ -14,16 +14,27 @@ 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,
[ [
AC_TRY_RUN([ gt_cv_int_divbyzero_sigfpe=
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);
...@@ -51,15 +62,18 @@ int main () ...@@ -51,15 +62,18 @@ 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.
case "$host_cpu" in changequote(,)dnl
alpha* | i[34567]86 | m68k | s390*) case "$host_cpu" in
gt_cv_int_divbyzero_sigfpe="guessing yes";; alpha* | i[34567]86 | x86_64 | m68k | s390*)
*) gt_cv_int_divbyzero_sigfpe="guessing yes";;
gt_cv_int_divbyzero_sigfpe="guessing no";; *)
esac gt_cv_int_divbyzero_sigfpe="guessing no";;
]) 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 3 (gettext-0.16) # intl.m4 serial 8 (gettext-0.17)
dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl Copyright (C) 1995-2007 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,7 +33,6 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -33,7 +33,6 @@ 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])
...@@ -98,7 +97,7 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -98,7 +97,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
cygwin*) is_woe32dll=yes ;; mingw* | cygwin*) is_woe32dll=yes ;;
*) is_woe32dll=no ;; *) is_woe32dll=no ;;
esac esac
else else
...@@ -107,6 +106,31 @@ AC_DEFUN([AM_INTL_SUBDIR], ...@@ -107,6 +106,31 @@ 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
...@@ -197,7 +221,9 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], ...@@ -197,7 +221,9 @@ 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)
]) ])
......
# intlmacosx.m4 serial 1 (gettext-0.17)
dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
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])
])
# intmax.m4 serial 3 (gettext-0.16)
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
dnl find a replacement if it is lacking.
AC_DEFUN([gt_TYPE_INTMAX_T],
[
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
[AC_TRY_COMPILE([
#include <stddef.h>
#include <stdlib.h>
#if HAVE_STDINT_H_WITH_UINTMAX
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H_WITH_UINTMAX
#include <inttypes.h>
#endif
], [intmax_t x = -1;
return !x;],
gt_cv_c_intmax_t=yes,
gt_cv_c_intmax_t=no)])
if test $gt_cv_c_intmax_t = yes; then
AC_DEFINE(HAVE_INTMAX_T, 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
fi
])
# lib-link.m4 serial 9 (gettext-0.16) # lib-link.m4 serial 13 (gettext-0.17)
dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl Copyright (C) 2001-2007 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.50) AC_PREREQ(2.54)
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])
...@@ -24,13 +26,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS], ...@@ -24,13 +26,16 @@ 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
...@@ -46,6 +51,8 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and ...@@ -46,6 +51,8 @@ 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])
...@@ -82,17 +89,23 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], ...@@ -82,17 +89,23 @@ 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 libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl acl_libext,
dnl hardcode_direct, hardcode_minus_L. dnl acl_shlibext,
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.
...@@ -109,12 +122,14 @@ AC_DEFUN([AC_LIB_RPATH], ...@@ -109,12 +122,14 @@ AC_DEFUN([AC_LIB_RPATH],
acl_cv_rpath=done acl_cv_rpath=done
]) ])
wl="$acl_cv_wl" wl="$acl_cv_wl"
libext="$acl_cv_libext" acl_libext="$acl_cv_libext"
shlibext="$acl_cv_shlibext" acl_shlibext="$acl_cv_shlibext"
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_libname_spec="$acl_cv_libname_spec"
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_library_names_spec="$acl_cv_library_names_spec"
hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
hardcode_minus_L="$acl_cv_hardcode_minus_L" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
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],
...@@ -124,20 +139,24 @@ AC_DEFUN([AC_LIB_RPATH], ...@@ -124,20 +139,24 @@ 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$1-prefix], AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
--without-lib$1-prefix don't search for lib$1 in includedir and libdir], --without-lib]N_A_M_E[-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
...@@ -158,6 +177,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ...@@ -158,6 +177,7 @@ 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=
...@@ -197,27 +217,53 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], ...@@ -197,27 +217,53 @@ 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
if test -n "$shlibext" \ dir="$additional_libdir"
&& { test -f "$additional_libdir/lib$name.$shlibext" \ dnl The same code as in the loop below:
|| { test "$shlibext" = dll \ dnl First look for a shared library.
&& test -f "$additional_libdir/lib$name.dll.a"; }; }; then if test -n "$acl_shlibext"; then
found_dir="$additional_libdir" if test -f "$dir/$libname$shrext"; then
if test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$dir"
found_so="$additional_libdir/lib$name.$shlibext" found_so="$dir/$libname$shrext"
else else
found_so="$additional_libdir/lib$name.dll.a" if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
ver=`(cd "$dir" && \
for f in "$libname$shrext".*; do echo "$f"; done \
| sed -e "s,^$libname$shrext\\\\.,," \