diff options
Diffstat (limited to 'm4')
45 files changed, 0 insertions, 3959 deletions
diff --git a/m4/Makefile.am.in b/m4/Makefile.am.in deleted file mode 100644 index fb60adac..00000000 --- a/m4/Makefile.am.in +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | ## This is a template from which Makefile.am is generated. -*-Makefile-*- | ||
| 2 | |||
| 3 | Makefile.am: Makefile.am.in | ||
| 4 | rm -f $@ $@t | ||
| 5 | (echo "## Process this file with automake to produce Makefile.in."; \ | ||
| 6 | echo EXTRA_DIST =; \ | ||
| 7 | echo "EXTRA_DIST += Makefile.am.in"; \ | ||
| 8 | ls -1 *.m4 | sed 's/^/EXTRA_DIST += /'; echo ) \ | ||
| 9 | >> $@t | ||
| 10 | sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t | ||
| 11 | chmod a-w $@t | ||
| 12 | mv $@t $@ | ||
| 13 | |||
| 14 | print_coreutil_files: | ||
| 15 | @echo $(EXTRA_DIST) | ||
diff --git a/m4/afs.m4 b/m4/afs.m4 deleted file mode 100644 index 6f7a56cc..00000000 --- a/m4/afs.m4 +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | #serial 8 | ||
| 2 | |||
| 3 | # Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. | ||
| 4 | # This file is free software; the Free Software Foundation | ||
| 5 | # gives unlimited permission to copy and/or distribute it, | ||
| 6 | # with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | AC_DEFUN([gl_AFS], | ||
| 9 | [ | ||
| 10 | AC_ARG_WITH(afs, | ||
| 11 | AC_HELP_STRING([--with-afs], | ||
| 12 | [support for the Andrew File System [[default=no]]]), | ||
| 13 | test "$withval" = no || with_afs=yes, with_afs=no) | ||
| 14 | if test "$with_afs" = yes; then | ||
| 15 | AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.]) | ||
| 16 | fi | ||
| 17 | ]) | ||
diff --git a/m4/alloca.m4 b/m4/alloca.m4 deleted file mode 100644 index a9e3f452..00000000 --- a/m4/alloca.m4 +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | # alloca.m4 serial 5 | ||
| 2 | dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_FUNC_ALLOCA], | ||
| 8 | [ | ||
| 9 | dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. | ||
| 10 | AC_REQUIRE([AC_PROG_CPP]) | ||
| 11 | AC_REQUIRE([AC_PROG_EGREP]) | ||
| 12 | |||
| 13 | AC_REQUIRE([AC_FUNC_ALLOCA]) | ||
| 14 | if test $ac_cv_func_alloca_works = no; then | ||
| 15 | gl_PREREQ_ALLOCA | ||
| 16 | fi | ||
| 17 | |||
| 18 | # Define an additional variable used in the Makefile substitution. | ||
| 19 | if test $ac_cv_working_alloca_h = yes; then | ||
| 20 | AC_EGREP_CPP([Need own alloca], [ | ||
| 21 | #if defined __GNUC__ || defined _AIX || defined _MSC_VER | ||
| 22 | Need own alloca | ||
| 23 | #endif | ||
| 24 | ], | ||
| 25 | [AC_DEFINE(HAVE_ALLOCA, 1, | ||
| 26 | [Define to 1 if you have `alloca' after including <alloca.h>, | ||
| 27 | a header that may be supplied by this distribution.]) | ||
| 28 | ALLOCA_H=alloca.h], | ||
| 29 | [ALLOCA_H=]) | ||
| 30 | else | ||
| 31 | ALLOCA_H=alloca.h | ||
| 32 | fi | ||
| 33 | AC_SUBST([ALLOCA_H]) | ||
| 34 | |||
| 35 | AC_DEFINE(HAVE_ALLOCA_H, 1, | ||
| 36 | [Define HAVE_ALLOCA_H for backward compatibility with older code | ||
| 37 | that includes <alloca.h> only if HAVE_ALLOCA_H is defined.]) | ||
| 38 | ]) | ||
| 39 | |||
| 40 | # Prerequisites of lib/alloca.c. | ||
| 41 | # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. | ||
| 42 | AC_DEFUN([gl_PREREQ_ALLOCA], [:]) | ||
diff --git a/m4/basename.m4 b/m4/basename.m4 deleted file mode 100644 index 69a0996f..00000000 --- a/m4/basename.m4 +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | # basename.m4 serial 1 | ||
| 2 | dnl Copyright (C) 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_BASENAME], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([basename.c, dirname.h]) | ||
| 10 | AC_LIBOBJ([basename]) | ||
| 11 | |||
| 12 | dnl Prerequisites of lib/basename.c. | ||
| 13 | AC_REQUIRE([gl_AC_DOS]) | ||
| 14 | ]) | ||
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4 deleted file mode 100644 index ffeb4588..00000000 --- a/m4/c-strtod.m4 +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | # c-strtod.m4 serial 6 | ||
| 2 | |||
| 3 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. | ||
| 4 | # This file is free software; the Free Software Foundation | ||
| 5 | # gives unlimited permission to copy and/or distribute it, | ||
| 6 | # with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | # Written by Paul Eggert. | ||
| 9 | |||
| 10 | AC_DEFUN([gl_C99_STRTOLD], | ||
| 11 | [ | ||
| 12 | AC_CACHE_CHECK([whether strtold conforms to C99], | ||
| 13 | [gl_cv_func_c99_strtold], | ||
| 14 | [AC_COMPILE_IFELSE( | ||
| 15 | [AC_LANG_PROGRAM( | ||
| 16 | [[/* On HP-UX before 11.23, strtold returns a struct instead of | ||
| 17 | long double. Reject implementations like that, by requiring | ||
| 18 | compatibility with the C99 prototype. */ | ||
| 19 | #include <stdlib.h> | ||
| 20 | static long double (*p) (char const *, char **) = strtold; | ||
| 21 | static long double | ||
| 22 | test (char const *nptr, char **endptr) | ||
| 23 | { | ||
| 24 | long double r; | ||
| 25 | r = strtold (nptr, endptr); | ||
| 26 | return r; | ||
| 27 | }]], | ||
| 28 | [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], | ||
| 29 | [gl_cv_func_c99_strtold=yes], | ||
| 30 | [gl_cv_func_c99_strtold=no])]) | ||
| 31 | if test $gl_cv_func_c99_strtold = yes; then | ||
| 32 | AC_DEFINE([HAVE_C99_STRTOLD], 1, [Define to 1 if strtold conforms to C99.]) | ||
| 33 | fi | ||
| 34 | ]) | ||
| 35 | |||
| 36 | AC_DEFUN([gl_C_STRTOD], | ||
| 37 | [ | ||
| 38 | AC_LIBSOURCES([c-strtod.c, c-strtod.h]) | ||
| 39 | AC_LIBOBJ([c-strtod]) | ||
| 40 | |||
| 41 | dnl Prerequisites of lib/c-strtod.c. | ||
| 42 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
| 43 | : | ||
| 44 | ]) | ||
| 45 | |||
| 46 | AC_DEFUN([gl_C_STRTOLD], | ||
| 47 | [ | ||
| 48 | AC_LIBSOURCES([c-strtold.c, c-strtod.h]) | ||
| 49 | AC_LIBOBJ([c-strtold]) | ||
| 50 | |||
| 51 | dnl Prerequisites of lib/c-strtold.c. | ||
| 52 | AC_REQUIRE([gl_C_STRTOD]) | ||
| 53 | AC_REQUIRE([gl_C99_STRTOLD]) | ||
| 54 | : | ||
| 55 | ]) | ||
diff --git a/m4/codeset.m4 b/m4/codeset.m4 deleted file mode 100644 index a6e67ec4..00000000 --- a/m4/codeset.m4 +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | # codeset.m4 serial AM1 (gettext-0.10.40) | ||
| 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | AC_DEFUN([AM_LANGINFO_CODESET], | ||
| 10 | [ | ||
| 11 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, | ||
| 12 | [AC_TRY_LINK([#include <langinfo.h>], | ||
| 13 | [char* cs = nl_langinfo(CODESET);], | ||
| 14 | am_cv_langinfo_codeset=yes, | ||
| 15 | am_cv_langinfo_codeset=no) | ||
| 16 | ]) | ||
| 17 | if test $am_cv_langinfo_codeset = yes; then | ||
| 18 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | ||
| 19 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | ||
| 20 | fi | ||
| 21 | ]) | ||
diff --git a/m4/dos.m4 b/m4/dos.m4 deleted file mode 100644 index 0713cf14..00000000 --- a/m4/dos.m4 +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | #serial 9 | ||
| 2 | |||
| 3 | # Define some macros required for proper operation of code in lib/*.c | ||
| 4 | # on MSDOS/Windows systems. | ||
| 5 | |||
| 6 | # Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. | ||
| 7 | # This file is free software; the Free Software Foundation | ||
| 8 | # gives unlimited permission to copy and/or distribute it, | ||
| 9 | # with or without modifications, as long as this notice is preserved. | ||
| 10 | |||
| 11 | # From Jim Meyering. | ||
| 12 | |||
| 13 | AC_DEFUN([gl_AC_DOS], | ||
| 14 | [ | ||
| 15 | AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], | ||
| 16 | [ | ||
| 17 | AC_TRY_COMPILE([], | ||
| 18 | [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ | ||
| 19 | neither MSDOS nor Windows | ||
| 20 | #endif], | ||
| 21 | [ac_cv_win_or_dos=yes], | ||
| 22 | [ac_cv_win_or_dos=no]) | ||
| 23 | ]) | ||
| 24 | |||
| 25 | if test x"$ac_cv_win_or_dos" = xyes; then | ||
| 26 | ac_fs_accepts_drive_letter_prefix=1 | ||
| 27 | ac_fs_backslash_is_file_name_separator=1 | ||
| 28 | else | ||
| 29 | ac_fs_accepts_drive_letter_prefix=0 | ||
| 30 | ac_fs_backslash_is_file_name_separator=0 | ||
| 31 | fi | ||
| 32 | |||
| 33 | AH_VERBATIM(FILE_SYSTEM_PREFIX_LEN, | ||
| 34 | [#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX | ||
| 35 | # define FILE_SYSTEM_PREFIX_LEN(Filename) \ | ||
| 36 | ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) | ||
| 37 | #else | ||
| 38 | # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 | ||
| 39 | #endif]) | ||
| 40 | |||
| 41 | AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], | ||
| 42 | $ac_fs_accepts_drive_letter_prefix, | ||
| 43 | [Define on systems for which file names may have a so-called | ||
| 44 | `drive letter' prefix, define this to compute the length of that | ||
| 45 | prefix, including the colon.]) | ||
| 46 | |||
| 47 | AH_VERBATIM(ISSLASH, | ||
| 48 | [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR | ||
| 49 | # define ISSLASH(C) ((C) == '/' || (C) == '\\') | ||
| 50 | #else | ||
| 51 | # define ISSLASH(C) ((C) == '/') | ||
| 52 | #endif]) | ||
| 53 | |||
| 54 | AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], | ||
| 55 | $ac_fs_backslash_is_file_name_separator, | ||
| 56 | [Define if the backslash character may also serve as a file name | ||
| 57 | component separator.]) | ||
| 58 | ]) | ||
diff --git a/m4/error.m4 b/m4/error.m4 deleted file mode 100644 index 7c7746e2..00000000 --- a/m4/error.m4 +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | #serial 11 | ||
| 2 | |||
| 3 | # Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software | ||
| 4 | # Foundation, Inc. | ||
| 5 | # | ||
| 6 | # This file is free software; the Free Software Foundation | ||
| 7 | # gives unlimited permission to copy and/or distribute it, | ||
| 8 | # with or without modifications, as long as this notice is preserved. | ||
| 9 | |||
| 10 | AC_DEFUN([gl_ERROR], | ||
| 11 | [ | ||
| 12 | AC_FUNC_ERROR_AT_LINE | ||
| 13 | dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). | ||
| 14 | gl_PREREQ_ERROR | ||
| 15 | ]) | ||
| 16 | |||
| 17 | # Prerequisites of lib/error.c. | ||
| 18 | AC_DEFUN([gl_PREREQ_ERROR], | ||
| 19 | [ | ||
| 20 | AC_REQUIRE([AC_FUNC_STRERROR_R]) | ||
| 21 | : | ||
| 22 | ]) | ||
diff --git a/m4/exitfail.m4 b/m4/exitfail.m4 deleted file mode 100644 index 5523676f..00000000 --- a/m4/exitfail.m4 +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | # exitfail.m4 serial 5 | ||
| 2 | dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_EXITFAIL], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([exitfail.c, exitfail.h]) | ||
| 10 | AC_LIBOBJ([exitfail]) | ||
| 11 | |||
| 12 | dnl No prerequisites of lib/exitfail.c. | ||
| 13 | : | ||
| 14 | ]) | ||
diff --git a/m4/extensions.m4 b/m4/extensions.m4 deleted file mode 100644 index e71845f1..00000000 --- a/m4/extensions.m4 +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | # Enable extensions on systems that normally disable them. | ||
| 2 | |||
| 3 | # Copyright (C) 2003 Free Software Foundation, Inc. | ||
| 4 | # This file is free software; the Free Software Foundation | ||
| 5 | # gives unlimited permission to copy and/or distribute it, | ||
| 6 | # with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | # gl_USE_SYSTEM_EXTENSIONS | ||
| 9 | # ------------------------ | ||
| 10 | # Enable extensions on systems that normally disable them, | ||
| 11 | # typically due to standards-conformance issues. | ||
| 12 | AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ | ||
| 13 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
| 14 | AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
| 15 | |||
| 16 | AC_REQUIRE([AC_GNU_SOURCE]) | ||
| 17 | AC_REQUIRE([AC_AIX]) | ||
| 18 | AC_REQUIRE([AC_MINIX]) | ||
| 19 | |||
| 20 | AH_VERBATIM([__EXTENSIONS__], | ||
| 21 | [/* Enable extensions on Solaris. */ | ||
| 22 | #ifndef __EXTENSIONS__ | ||
| 23 | # undef __EXTENSIONS__ | ||
| 24 | #endif | ||
| 25 | #ifndef _POSIX_PTHREAD_SEMANTICS | ||
| 26 | # undef _POSIX_PTHREAD_SEMANTICS | ||
| 27 | #endif]) | ||
| 28 | AC_DEFINE([__EXTENSIONS__]) | ||
| 29 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
| 30 | ]) | ||
diff --git a/m4/fcntl-safer.m4 b/m4/fcntl-safer.m4 deleted file mode 100644 index be210f9a..00000000 --- a/m4/fcntl-safer.m4 +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | #serial 2 | ||
| 2 | dnl Copyright (C) 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_FCNTL_SAFER], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([creat-safer.c, fcntl-safer.h, open-safer.c, fcntl--.h]) | ||
| 10 | AC_LIBOBJ([open-safer]) | ||
| 11 | AC_LIBOBJ([creat-safer]) | ||
| 12 | ]) | ||
diff --git a/m4/fstypename.m4 b/m4/fstypename.m4 deleted file mode 100644 index 7ff33e20..00000000 --- a/m4/fstypename.m4 +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | #serial 5 | ||
| 2 | |||
| 3 | dnl From Jim Meyering. | ||
| 4 | dnl | ||
| 5 | dnl See if struct statfs has the f_fstypename member. | ||
| 6 | dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. | ||
| 7 | dnl | ||
| 8 | |||
| 9 | # Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc. | ||
| 10 | # This file is free software; the Free Software Foundation | ||
| 11 | # gives unlimited permission to copy and/or distribute it, | ||
| 12 | # with or without modifications, as long as this notice is preserved. | ||
| 13 | |||
| 14 | AC_DEFUN([gl_FSTYPENAME], | ||
| 15 | [ | ||
| 16 | AC_CACHE_CHECK([for f_fstypename in struct statfs], | ||
| 17 | fu_cv_sys_f_fstypename_in_statfs, | ||
| 18 | [ | ||
| 19 | AC_TRY_COMPILE( | ||
| 20 | [ | ||
| 21 | #include <sys/param.h> | ||
| 22 | #include <sys/types.h> | ||
| 23 | #include <sys/mount.h> | ||
| 24 | ], | ||
| 25 | [struct statfs s; int i = sizeof s.f_fstypename;], | ||
| 26 | fu_cv_sys_f_fstypename_in_statfs=yes, | ||
| 27 | fu_cv_sys_f_fstypename_in_statfs=no | ||
| 28 | ) | ||
| 29 | ] | ||
| 30 | ) | ||
| 31 | |||
| 32 | if test $fu_cv_sys_f_fstypename_in_statfs = yes; then | ||
| 33 | AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1, | ||
| 34 | [Define if struct statfs has the f_fstypename member.]) | ||
| 35 | fi | ||
| 36 | ] | ||
| 37 | ) | ||
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 deleted file mode 100644 index dd10f799..00000000 --- a/m4/fsusage.m4 +++ /dev/null | |||
| @@ -1,260 +0,0 @@ | |||
| 1 | #serial 16 | ||
| 2 | # Obtaining file system usage information. | ||
| 3 | |||
| 4 | # Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005 Free Software | ||
| 5 | # Foundation, Inc. | ||
| 6 | # | ||
| 7 | # This file is free software; the Free Software Foundation | ||
| 8 | # gives unlimited permission to copy and/or distribute it, | ||
| 9 | # with or without modifications, as long as this notice is preserved. | ||
| 10 | |||
| 11 | # Written by Jim Meyering. | ||
| 12 | |||
| 13 | AC_DEFUN([gl_FSUSAGE], | ||
| 14 | [ | ||
| 15 | AC_LIBSOURCES([fsusage.c, fsusage.h]) | ||
| 16 | |||
| 17 | AC_CHECK_HEADERS_ONCE(sys/param.h) | ||
| 18 | AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h) | ||
| 19 | AC_CHECK_HEADERS(sys/mount.h, [], [], | ||
| 20 | [AC_INCLUDES_DEFAULT | ||
| 21 | [#if HAVE_SYS_PARAM_H | ||
| 22 | #include <sys/param.h> | ||
| 23 | #endif]]) | ||
| 24 | gl_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no]) | ||
| 25 | if test $gl_cv_fs_space = yes; then | ||
| 26 | AC_LIBOBJ(fsusage) | ||
| 27 | gl_PREREQ_FSUSAGE_EXTRA | ||
| 28 | fi | ||
| 29 | ]) | ||
| 30 | |||
| 31 | # Try to determine how a program can obtain file system usage information. | ||
| 32 | # If successful, define the appropriate symbol (see fsusage.c) and | ||
| 33 | # execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND. | ||
| 34 | # | ||
| 35 | # gl_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
| 36 | |||
| 37 | AC_DEFUN([gl_FILE_SYSTEM_USAGE], | ||
| 38 | [ | ||
| 39 | |||
| 40 | echo "checking how to get file system space usage..." | ||
| 41 | ac_fsusage_space=no | ||
| 42 | |||
| 43 | # Perform only the link test since it seems there are no variants of the | ||
| 44 | # statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) | ||
| 45 | # because that got a false positive on SCO OSR5. Adding the declaration | ||
| 46 | # of a `struct statvfs' causes this test to fail (as it should) on such | ||
| 47 | # systems. That system is reported to work fine with STAT_STATFS4 which | ||
| 48 | # is what it gets when this test fails. | ||
| 49 | if test $ac_fsusage_space = no; then | ||
| 50 | # SVR4 | ||
| 51 | AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs, | ||
| 52 | [AC_TRY_LINK([#include <sys/types.h> | ||
| 53 | #ifdef __GLIBC__ | ||
| 54 | Do not use statvfs on systems with GNU libc, because that function stats | ||
| 55 | all preceding entries in /proc/mounts, and that makes df hang if even | ||
| 56 | one of the corresponding file systems is hard-mounted, but not available. | ||
| 57 | #endif | ||
| 58 | #include <sys/statvfs.h>], | ||
| 59 | [struct statvfs fsd; statvfs (0, &fsd);], | ||
| 60 | fu_cv_sys_stat_statvfs=yes, | ||
| 61 | fu_cv_sys_stat_statvfs=no)]) | ||
| 62 | if test $fu_cv_sys_stat_statvfs = yes; then | ||
| 63 | ac_fsusage_space=yes | ||
| 64 | AC_DEFINE(STAT_STATVFS, 1, | ||
| 65 | [ Define if there is a function named statvfs. (SVR4)]) | ||
| 66 | fi | ||
| 67 | fi | ||
| 68 | |||
| 69 | if test $ac_fsusage_space = no; then | ||
| 70 | # DEC Alpha running OSF/1 | ||
| 71 | AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) | ||
| 72 | AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, | ||
| 73 | [AC_TRY_RUN([ | ||
| 74 | #include <sys/param.h> | ||
| 75 | #include <sys/types.h> | ||
| 76 | #include <sys/mount.h> | ||
| 77 | main () | ||
| 78 | { | ||
| 79 | struct statfs fsd; | ||
| 80 | fsd.f_fsize = 0; | ||
| 81 | exit (statfs (".", &fsd, sizeof (struct statfs))); | ||
| 82 | }], | ||
| 83 | fu_cv_sys_stat_statfs3_osf1=yes, | ||
| 84 | fu_cv_sys_stat_statfs3_osf1=no, | ||
| 85 | fu_cv_sys_stat_statfs3_osf1=no)]) | ||
| 86 | AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) | ||
| 87 | if test $fu_cv_sys_stat_statfs3_osf1 = yes; then | ||
| 88 | ac_fsusage_space=yes | ||
| 89 | AC_DEFINE(STAT_STATFS3_OSF1, 1, | ||
| 90 | [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) | ||
| 91 | fi | ||
| 92 | fi | ||
| 93 | |||
| 94 | if test $ac_fsusage_space = no; then | ||
| 95 | # AIX | ||
| 96 | AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl | ||
| 97 | member (AIX, 4.3BSD)]) | ||
| 98 | AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, | ||
| 99 | [AC_TRY_RUN([ | ||
| 100 | #ifdef HAVE_SYS_PARAM_H | ||
| 101 | #include <sys/param.h> | ||
| 102 | #endif | ||
| 103 | #ifdef HAVE_SYS_MOUNT_H | ||
| 104 | #include <sys/mount.h> | ||
| 105 | #endif | ||
| 106 | #ifdef HAVE_SYS_VFS_H | ||
| 107 | #include <sys/vfs.h> | ||
| 108 | #endif | ||
| 109 | main () | ||
| 110 | { | ||
| 111 | struct statfs fsd; | ||
| 112 | fsd.f_bsize = 0; | ||
| 113 | exit (statfs (".", &fsd)); | ||
| 114 | }], | ||
| 115 | fu_cv_sys_stat_statfs2_bsize=yes, | ||
| 116 | fu_cv_sys_stat_statfs2_bsize=no, | ||
| 117 | fu_cv_sys_stat_statfs2_bsize=no)]) | ||
| 118 | AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) | ||
| 119 | if test $fu_cv_sys_stat_statfs2_bsize = yes; then | ||
| 120 | ac_fsusage_space=yes | ||
| 121 | AC_DEFINE(STAT_STATFS2_BSIZE, 1, | ||
| 122 | [ Define if statfs takes 2 args and struct statfs has a field named f_bsize. | ||
| 123 | (4.3BSD, SunOS 4, HP-UX, AIX PS/2)]) | ||
| 124 | fi | ||
| 125 | fi | ||
| 126 | |||
| 127 | if test $ac_fsusage_space = no; then | ||
| 128 | # SVR3 | ||
| 129 | AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) | ||
| 130 | AC_CACHE_VAL(fu_cv_sys_stat_statfs4, | ||
| 131 | [AC_TRY_RUN([#include <sys/types.h> | ||
| 132 | #include <sys/statfs.h> | ||
| 133 | main () | ||
| 134 | { | ||
| 135 | struct statfs fsd; | ||
| 136 | exit (statfs (".", &fsd, sizeof fsd, 0)); | ||
| 137 | }], | ||
| 138 | fu_cv_sys_stat_statfs4=yes, | ||
| 139 | fu_cv_sys_stat_statfs4=no, | ||
| 140 | fu_cv_sys_stat_statfs4=no)]) | ||
| 141 | AC_MSG_RESULT($fu_cv_sys_stat_statfs4) | ||
| 142 | if test $fu_cv_sys_stat_statfs4 = yes; then | ||
| 143 | ac_fsusage_space=yes | ||
| 144 | AC_DEFINE(STAT_STATFS4, 1, | ||
| 145 | [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) | ||
| 146 | fi | ||
| 147 | fi | ||
| 148 | |||
| 149 | if test $ac_fsusage_space = no; then | ||
| 150 | # 4.4BSD and NetBSD | ||
| 151 | AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl | ||
| 152 | member (4.4BSD and NetBSD)]) | ||
| 153 | AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, | ||
| 154 | [AC_TRY_RUN([#include <sys/types.h> | ||
| 155 | #ifdef HAVE_SYS_PARAM_H | ||
| 156 | #include <sys/param.h> | ||
| 157 | #endif | ||
| 158 | #ifdef HAVE_SYS_MOUNT_H | ||
| 159 | #include <sys/mount.h> | ||
| 160 | #endif | ||
| 161 | main () | ||
| 162 | { | ||
| 163 | struct statfs fsd; | ||
| 164 | fsd.f_fsize = 0; | ||
| 165 | exit (statfs (".", &fsd)); | ||
| 166 | }], | ||
| 167 | fu_cv_sys_stat_statfs2_fsize=yes, | ||
| 168 | fu_cv_sys_stat_statfs2_fsize=no, | ||
| 169 | fu_cv_sys_stat_statfs2_fsize=no)]) | ||
| 170 | AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) | ||
| 171 | if test $fu_cv_sys_stat_statfs2_fsize = yes; then | ||
| 172 | ac_fsusage_space=yes | ||
| 173 | AC_DEFINE(STAT_STATFS2_FSIZE, 1, | ||
| 174 | [ Define if statfs takes 2 args and struct statfs has a field named f_fsize. | ||
| 175 | (4.4BSD, NetBSD)]) | ||
| 176 | fi | ||
| 177 | fi | ||
| 178 | |||
| 179 | if test $ac_fsusage_space = no; then | ||
| 180 | # Ultrix | ||
| 181 | AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) | ||
| 182 | AC_CACHE_VAL(fu_cv_sys_stat_fs_data, | ||
| 183 | [AC_TRY_RUN([#include <sys/types.h> | ||
| 184 | #ifdef HAVE_SYS_PARAM_H | ||
| 185 | #include <sys/param.h> | ||
| 186 | #endif | ||
| 187 | #ifdef HAVE_SYS_MOUNT_H | ||
| 188 | #include <sys/mount.h> | ||
| 189 | #endif | ||
| 190 | #ifdef HAVE_SYS_FS_TYPES_H | ||
| 191 | #include <sys/fs_types.h> | ||
| 192 | #endif | ||
| 193 | main () | ||
| 194 | { | ||
| 195 | struct fs_data fsd; | ||
| 196 | /* Ultrix's statfs returns 1 for success, | ||
| 197 | 0 for not mounted, -1 for failure. */ | ||
| 198 | exit (statfs (".", &fsd) != 1); | ||
| 199 | }], | ||
| 200 | fu_cv_sys_stat_fs_data=yes, | ||
| 201 | fu_cv_sys_stat_fs_data=no, | ||
| 202 | fu_cv_sys_stat_fs_data=no)]) | ||
| 203 | AC_MSG_RESULT($fu_cv_sys_stat_fs_data) | ||
| 204 | if test $fu_cv_sys_stat_fs_data = yes; then | ||
| 205 | ac_fsusage_space=yes | ||
| 206 | AC_DEFINE(STAT_STATFS2_FS_DATA, 1, | ||
| 207 | [ Define if statfs takes 2 args and the second argument has | ||
| 208 | type struct fs_data. (Ultrix)]) | ||
| 209 | fi | ||
| 210 | fi | ||
| 211 | |||
| 212 | if test $ac_fsusage_space = no; then | ||
| 213 | # SVR2 | ||
| 214 | AC_TRY_CPP([#include <sys/filsys.h> | ||
| 215 | ], | ||
| 216 | AC_DEFINE(STAT_READ_FILSYS, 1, | ||
| 217 | [Define if there is no specific function for reading file systems usage | ||
| 218 | information and you have the <sys/filsys.h> header file. (SVR2)]) | ||
| 219 | ac_fsusage_space=yes) | ||
| 220 | fi | ||
| 221 | |||
| 222 | AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) | ||
| 223 | |||
| 224 | ]) | ||
| 225 | |||
| 226 | |||
| 227 | # Check for SunOS statfs brokenness wrt partitions 2GB and larger. | ||
| 228 | # If <sys/vfs.h> exists and struct statfs has a member named f_spare, | ||
| 229 | # enable the work-around code in fsusage.c. | ||
| 230 | AC_DEFUN([gl_STATFS_TRUNCATES], | ||
| 231 | [ | ||
| 232 | AC_MSG_CHECKING([for statfs that truncates block counts]) | ||
| 233 | AC_CACHE_VAL(fu_cv_sys_truncating_statfs, | ||
| 234 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 235 | #if !defined(sun) && !defined(__sun) | ||
| 236 | choke -- this is a workaround for a Sun-specific problem | ||
| 237 | #endif | ||
| 238 | #include <sys/types.h> | ||
| 239 | #include <sys/vfs.h>]], | ||
| 240 | [[struct statfs t; long c = *(t.f_spare);]])], | ||
| 241 | [fu_cv_sys_truncating_statfs=yes], | ||
| 242 | [fu_cv_sys_truncating_statfs=no])]) | ||
| 243 | if test $fu_cv_sys_truncating_statfs = yes; then | ||
| 244 | AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1, | ||
| 245 | [Define if the block counts reported by statfs may be truncated to 2GB | ||
| 246 | and the correct values may be stored in the f_spare array. | ||
| 247 | (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. | ||
| 248 | SunOS 4.1.1 seems not to be affected.)]) | ||
| 249 | fi | ||
| 250 | AC_MSG_RESULT($fu_cv_sys_truncating_statfs) | ||
| 251 | ]) | ||
| 252 | |||
| 253 | |||
| 254 | # Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. | ||
| 255 | AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], | ||
| 256 | [ | ||
| 257 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) | ||
| 258 | AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) | ||
| 259 | gl_STATFS_TRUNCATES | ||
| 260 | ]) | ||
diff --git a/m4/getopt.m4 b/m4/getopt.m4 deleted file mode 100644 index 6b98782c..00000000 --- a/m4/getopt.m4 +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | # getopt.m4 serial 11 | ||
| 2 | dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | # The getopt module assume you want GNU getopt, with getopt_long etc, | ||
| 8 | # rather than vanilla POSIX getopt. This means your your code should | ||
| 9 | # always include <getopt.h> for the getopt prototypes. | ||
| 10 | |||
| 11 | AC_DEFUN([gl_GETOPT_SUBSTITUTE], | ||
| 12 | [ | ||
| 13 | AC_LIBOBJ([getopt]) | ||
| 14 | AC_LIBOBJ([getopt1]) | ||
| 15 | gl_GETOPT_SUBSTITUTE_HEADER | ||
| 16 | gl_PREREQ_GETOPT | ||
| 17 | ]) | ||
| 18 | |||
| 19 | AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], | ||
| 20 | [ | ||
| 21 | GETOPT_H=getopt.h | ||
| 22 | AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], | ||
| 23 | [Define to rpl_ if the getopt replacement functions and variables | ||
| 24 | should be used.]) | ||
| 25 | AC_SUBST([GETOPT_H]) | ||
| 26 | ]) | ||
| 27 | |||
| 28 | AC_DEFUN([gl_GETOPT_CHECK_HEADERS], | ||
| 29 | [ | ||
| 30 | if test -z "$GETOPT_H"; then | ||
| 31 | AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) | ||
| 32 | fi | ||
| 33 | |||
| 34 | if test -z "$GETOPT_H"; then | ||
| 35 | AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) | ||
| 36 | fi | ||
| 37 | |||
| 38 | dnl BSD getopt_long uses an incompatible method to reset option processing, | ||
| 39 | dnl and (as of 2004-10-15) mishandles optional option-arguments. | ||
| 40 | if test -z "$GETOPT_H"; then | ||
| 41 | AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) | ||
| 42 | fi | ||
| 43 | |||
| 44 | dnl Solaris 10 getopt doesn't handle `+' as a leading character in an | ||
| 45 | dnl option string (as of 2005-05-05). | ||
| 46 | if test -z "$GETOPT_H"; then | ||
| 47 | AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt], | ||
| 48 | [AC_RUN_IFELSE( | ||
| 49 | [AC_LANG_PROGRAM([#include <getopt.h>], | ||
| 50 | [[ | ||
| 51 | char *myargv[3]; | ||
| 52 | myargv[0] = "conftest"; | ||
| 53 | myargv[1] = "-+"; | ||
| 54 | myargv[2] = 0; | ||
| 55 | return getopt (2, myargv, "+a") != '?'; | ||
| 56 | ]])], | ||
| 57 | [gl_cv_func_gnu_getopt=yes], | ||
| 58 | [gl_cv_func_gnu_getopt=no], | ||
| 59 | [dnl cross compiling - pessimistically guess based on decls | ||
| 60 | dnl Solaris 10 getopt doesn't handle `+' as a leading character in an | ||
| 61 | dnl option string (as of 2005-05-05). | ||
| 62 | AC_CHECK_DECL([getopt_clip], | ||
| 63 | [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes], | ||
| 64 | [#include <getopt.h>])])]) | ||
| 65 | if test "$gl_cv_func_gnu_getopt" = "no"; then | ||
| 66 | GETOPT_H=getopt.h | ||
| 67 | fi | ||
| 68 | fi | ||
| 69 | ]) | ||
| 70 | |||
| 71 | AC_DEFUN([gl_GETOPT_IFELSE], | ||
| 72 | [ | ||
| 73 | AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) | ||
| 74 | AS_IF([test -n "$GETOPT_H"], [$1], [$2]) | ||
| 75 | ]) | ||
| 76 | |||
| 77 | AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])]) | ||
| 78 | |||
| 79 | # Prerequisites of lib/getopt*. | ||
| 80 | AC_DEFUN([gl_PREREQ_GETOPT], [:]) | ||
diff --git a/m4/gettext.m4 b/m4/gettext.m4 deleted file mode 100644 index 624a8078..00000000 --- a/m4/gettext.m4 +++ /dev/null | |||
| @@ -1,549 +0,0 @@ | |||
| 1 | # gettext.m4 serial 37 (gettext-0.14.4) | ||
| 2 | dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | dnl | ||
| 7 | dnl This file can can be used in projects which are not available under | ||
| 8 | dnl the GNU General Public License or the GNU Library General Public | ||
| 9 | dnl License but which still want to provide support for the GNU gettext | ||
| 10 | dnl functionality. | ||
| 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
| 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
| 13 | dnl gettext package package is covered by the GNU General Public License. | ||
| 14 | dnl They are *not* in the public domain. | ||
| 15 | |||
| 16 | dnl Authors: | ||
| 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
| 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | ||
| 19 | |||
| 20 | dnl Macro to add for using GNU gettext. | ||
| 21 | |||
| 22 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). | ||
| 23 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The | ||
| 24 | dnl default (if it is not specified or empty) is 'no-libtool'. | ||
| 25 | dnl INTLSYMBOL should be 'external' for packages with no intl directory, | ||
| 26 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. | ||
| 27 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library | ||
| 28 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, | ||
| 29 | dnl depending on --{enable,disable}-{shared,static} and on the presence of | ||
| 30 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library | ||
| 31 | dnl $(top_builddir)/intl/libintl.a will be created. | ||
| 32 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext | ||
| 33 | dnl implementations (in libc or libintl) without the ngettext() function | ||
| 34 | dnl will be ignored. If NEEDSYMBOL is specified and is | ||
| 35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't | ||
| 36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | ||
| 37 | dnl INTLDIR is used to find the intl libraries. If empty, | ||
| 38 | dnl the value `$(top_builddir)/intl/' is used. | ||
| 39 | dnl | ||
| 40 | dnl The result of the configuration is one of three cases: | ||
| 41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | ||
| 42 | dnl and used. | ||
| 43 | dnl Catalog format: GNU --> install in $(datadir) | ||
| 44 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
| 45 | dnl 2) GNU gettext has been found in the system's C library. | ||
| 46 | dnl Catalog format: GNU --> install in $(datadir) | ||
| 47 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
| 48 | dnl 3) No internationalization, always use English msgid. | ||
| 49 | dnl Catalog format: none | ||
| 50 | dnl Catalog extension: none | ||
| 51 | dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. | ||
| 52 | dnl The use of .gmo is historical (it was needed to avoid overwriting the | ||
| 53 | dnl GNU format catalogs when building on a platform with an X/Open gettext), | ||
| 54 | dnl but we keep it in order not to force irrelevant filename changes on the | ||
| 55 | dnl maintainers. | ||
| 56 | dnl | ||
| 57 | AC_DEFUN([AM_GNU_GETTEXT], | ||
| 58 | [ | ||
| 59 | dnl Argument checking. | ||
| 60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | ||
| 61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | ||
| 62 | ])])])])]) | ||
| 63 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | ||
| 64 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | ||
| 65 | ])])])]) | ||
| 66 | define([gt_included_intl], ifelse([$1], [external], [no], [yes])) | ||
| 67 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | ||
| 68 | |||
| 69 | AC_REQUIRE([AM_PO_SUBDIRS])dnl | ||
| 70 | ifelse(gt_included_intl, yes, [ | ||
| 71 | AC_REQUIRE([AM_INTL_SUBDIR])dnl | ||
| 72 | ]) | ||
| 73 | |||
| 74 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
| 75 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 76 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 77 | |||
| 78 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
| 79 | dnl Ideally we would do this search only after the | ||
| 80 | dnl if test "$USE_NLS" = "yes"; then | ||
| 81 | dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then | ||
| 82 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT | ||
| 83 | dnl the configure script would need to contain the same shell code | ||
| 84 | dnl again, outside any 'if'. There are two solutions: | ||
| 85 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. | ||
| 86 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. | ||
| 87 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not | ||
| 88 | dnl documented, we avoid it. | ||
| 89 | ifelse(gt_included_intl, yes, , [ | ||
| 90 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
| 91 | ]) | ||
| 92 | |||
| 93 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. | ||
| 94 | gt_INTL_MACOSX | ||
| 95 | |||
| 96 | dnl Set USE_NLS. | ||
| 97 | AM_NLS | ||
| 98 | |||
| 99 | ifelse(gt_included_intl, yes, [ | ||
| 100 | BUILD_INCLUDED_LIBINTL=no | ||
| 101 | USE_INCLUDED_LIBINTL=no | ||
| 102 | ]) | ||
| 103 | LIBINTL= | ||
| 104 | LTLIBINTL= | ||
| 105 | POSUB= | ||
| 106 | |||
| 107 | dnl If we use NLS figure out what method | ||
| 108 | if test "$USE_NLS" = "yes"; then | ||
| 109 | gt_use_preinstalled_gnugettext=no | ||
| 110 | ifelse(gt_included_intl, yes, [ | ||
| 111 | AC_MSG_CHECKING([whether included gettext is requested]) | ||
| 112 | AC_ARG_WITH(included-gettext, | ||
| 113 | [ --with-included-gettext use the GNU gettext library included here], | ||
| 114 | nls_cv_force_use_gnu_gettext=$withval, | ||
| 115 | nls_cv_force_use_gnu_gettext=no) | ||
| 116 | AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) | ||
| 117 | |||
| 118 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | ||
| 119 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | ||
| 120 | ]) | ||
| 121 | dnl User does not insist on using GNU NLS library. Figure out what | ||
| 122 | dnl to use. If GNU gettext is available we use this. Else we have | ||
| 123 | dnl to fall back to GNU NLS library. | ||
| 124 | |||
| 125 | dnl Add a version number to the cache macros. | ||
| 126 | define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) | ||
| 127 | define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) | ||
| 128 | define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) | ||
| 129 | |||
| 130 | AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, | ||
| 131 | [AC_TRY_LINK([#include <libintl.h> | ||
| 132 | ]ifelse([$2], [need-formatstring-macros], | ||
| 133 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
| 134 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
| 135 | #endif | ||
| 136 | changequote(,)dnl | ||
| 137 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
| 138 | changequote([,])dnl | ||
| 139 | ], [])[extern int _nl_msg_cat_cntr; | ||
| 140 | extern int *_nl_domain_bindings;], | ||
| 141 | [bindtextdomain ("", ""); | ||
| 142 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], | ||
| 143 | gt_cv_func_gnugettext_libc=yes, | ||
| 144 | gt_cv_func_gnugettext_libc=no)]) | ||
| 145 | |||
| 146 | if test "$gt_cv_func_gnugettext_libc" != "yes"; then | ||
| 147 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
| 148 | ifelse(gt_included_intl, yes, , [ | ||
| 149 | AM_ICONV_LINK | ||
| 150 | ]) | ||
| 151 | dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL | ||
| 152 | dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) | ||
| 153 | dnl because that would add "-liconv" to LIBINTL and LTLIBINTL | ||
| 154 | dnl even if libiconv doesn't exist. | ||
| 155 | AC_LIB_LINKFLAGS_BODY([intl]) | ||
| 156 | AC_CACHE_CHECK([for GNU gettext in libintl], | ||
| 157 | gt_cv_func_gnugettext_libintl, | ||
| 158 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
| 159 | CPPFLAGS="$CPPFLAGS $INCINTL" | ||
| 160 | gt_save_LIBS="$LIBS" | ||
| 161 | LIBS="$LIBS $LIBINTL" | ||
| 162 | dnl Now see whether libintl exists and does not depend on libiconv. | ||
| 163 | AC_TRY_LINK([#include <libintl.h> | ||
| 164 | ]ifelse([$2], [need-formatstring-macros], | ||
| 165 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
| 166 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
| 167 | #endif | ||
| 168 | changequote(,)dnl | ||
| 169 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
| 170 | changequote([,])dnl | ||
| 171 | ], [])[extern int _nl_msg_cat_cntr; | ||
| 172 | extern | ||
| 173 | #ifdef __cplusplus | ||
| 174 | "C" | ||
| 175 | #endif | ||
| 176 | const char *_nl_expand_alias (const char *);], | ||
| 177 | [bindtextdomain ("", ""); | ||
| 178 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | ||
| 179 | gt_cv_func_gnugettext_libintl=yes, | ||
| 180 | gt_cv_func_gnugettext_libintl=no) | ||
| 181 | dnl Now see whether libintl exists and depends on libiconv. | ||
| 182 | if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then | ||
| 183 | LIBS="$LIBS $LIBICONV" | ||
| 184 | AC_TRY_LINK([#include <libintl.h> | ||
| 185 | ]ifelse([$2], [need-formatstring-macros], | ||
| 186 | [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
| 187 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
| 188 | #endif | ||
| 189 | changequote(,)dnl | ||
| 190 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
| 191 | changequote([,])dnl | ||
| 192 | ], [])[extern int _nl_msg_cat_cntr; | ||
| 193 | extern | ||
| 194 | #ifdef __cplusplus | ||
| 195 | "C" | ||
| 196 | #endif | ||
| 197 | const char *_nl_expand_alias (const char *);], | ||
| 198 | [bindtextdomain ("", ""); | ||
| 199 | return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | ||
| 200 | [LIBINTL="$LIBINTL $LIBICONV" | ||
| 201 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
| 202 | gt_cv_func_gnugettext_libintl=yes | ||
| 203 | ]) | ||
| 204 | fi | ||
| 205 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
| 206 | LIBS="$gt_save_LIBS"]) | ||
| 207 | fi | ||
| 208 | |||
| 209 | dnl If an already present or preinstalled GNU gettext() is found, | ||
| 210 | dnl use it. But if this macro is used in GNU gettext, and GNU | ||
| 211 | dnl gettext is already preinstalled in libintl, we update this | ||
| 212 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) | ||
| 213 | if test "$gt_cv_func_gnugettext_libc" = "yes" \ | ||
| 214 | || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ | ||
| 215 | && test "$PACKAGE" != gettext-runtime \ | ||
| 216 | && test "$PACKAGE" != gettext-tools; }; then | ||
| 217 | gt_use_preinstalled_gnugettext=yes | ||
| 218 | else | ||
| 219 | dnl Reset the values set by searching for libintl. | ||
| 220 | LIBINTL= | ||
| 221 | LTLIBINTL= | ||
| 222 | INCINTL= | ||
| 223 | fi | ||
| 224 | |||
| 225 | ifelse(gt_included_intl, yes, [ | ||
| 226 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then | ||
| 227 | dnl GNU gettext is not found in the C library. | ||
| 228 | dnl Fall back on included GNU gettext library. | ||
| 229 | nls_cv_use_gnu_gettext=yes | ||
| 230 | fi | ||
| 231 | fi | ||
| 232 | |||
| 233 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
| 234 | dnl Mark actions used to generate GNU NLS library. | ||
| 235 | BUILD_INCLUDED_LIBINTL=yes | ||
| 236 | USE_INCLUDED_LIBINTL=yes | ||
| 237 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" | ||
| 238 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" | ||
| 239 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | ||
| 240 | fi | ||
| 241 | |||
| 242 | CATOBJEXT= | ||
| 243 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
| 244 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
| 245 | dnl Mark actions to use GNU gettext tools. | ||
| 246 | CATOBJEXT=.gmo | ||
| 247 | fi | ||
| 248 | ]) | ||
| 249 | |||
| 250 | if test -n "$INTL_MACOSX_LIBS"; then | ||
| 251 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
| 252 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
| 253 | dnl Some extra flags are needed during linking. | ||
| 254 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | ||
| 255 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | ||
| 256 | fi | ||
| 257 | fi | ||
| 258 | |||
| 259 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
| 260 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
| 261 | AC_DEFINE(ENABLE_NLS, 1, | ||
| 262 | [Define to 1 if translation of program messages to the user's native language | ||
| 263 | is requested.]) | ||
| 264 | else | ||
| 265 | USE_NLS=no | ||
| 266 | fi | ||
| 267 | fi | ||
| 268 | |||
| 269 | AC_MSG_CHECKING([whether to use NLS]) | ||
| 270 | AC_MSG_RESULT([$USE_NLS]) | ||
| 271 | if test "$USE_NLS" = "yes"; then | ||
| 272 | AC_MSG_CHECKING([where the gettext function comes from]) | ||
| 273 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
| 274 | if test "$gt_cv_func_gnugettext_libintl" = "yes"; then | ||
| 275 | gt_source="external libintl" | ||
| 276 | else | ||
| 277 | gt_source="libc" | ||
| 278 | fi | ||
| 279 | else | ||
| 280 | gt_source="included intl directory" | ||
| 281 | fi | ||
| 282 | AC_MSG_RESULT([$gt_source]) | ||
| 283 | fi | ||
| 284 | |||
| 285 | if test "$USE_NLS" = "yes"; then | ||
| 286 | |||
| 287 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
| 288 | if test "$gt_cv_func_gnugettext_libintl" = "yes"; then | ||
| 289 | AC_MSG_CHECKING([how to link with libintl]) | ||
| 290 | AC_MSG_RESULT([$LIBINTL]) | ||
| 291 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) | ||
| 292 | fi | ||
| 293 | |||
| 294 | dnl For backward compatibility. Some packages may be using this. | ||
| 295 | AC_DEFINE(HAVE_GETTEXT, 1, | ||
| 296 | [Define if the GNU gettext() function is already present or preinstalled.]) | ||
| 297 | AC_DEFINE(HAVE_DCGETTEXT, 1, | ||
| 298 | [Define if the GNU dcgettext() function is already present or preinstalled.]) | ||
| 299 | fi | ||
| 300 | |||
| 301 | dnl We need to process the po/ directory. | ||
| 302 | POSUB=po | ||
| 303 | fi | ||
| 304 | |||
| 305 | ifelse(gt_included_intl, yes, [ | ||
| 306 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | ||
| 307 | dnl to 'yes' because some of the testsuite requires it. | ||
| 308 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then | ||
| 309 | BUILD_INCLUDED_LIBINTL=yes | ||
| 310 | fi | ||
| 311 | |||
| 312 | dnl Make all variables we use known to autoconf. | ||
| 313 | AC_SUBST(BUILD_INCLUDED_LIBINTL) | ||
| 314 | AC_SUBST(USE_INCLUDED_LIBINTL) | ||
| 315 | AC_SUBST(CATOBJEXT) | ||
| 316 | |||
| 317 | dnl For backward compatibility. Some configure.ins may be using this. | ||
| 318 | nls_cv_header_intl= | ||
| 319 | nls_cv_header_libgt= | ||
| 320 | |||
| 321 | dnl For backward compatibility. Some Makefiles may be using this. | ||
| 322 | DATADIRNAME=share | ||
| 323 | AC_SUBST(DATADIRNAME) | ||
| 324 | |||
| 325 | dnl For backward compatibility. Some Makefiles may be using this. | ||
| 326 | INSTOBJEXT=.mo | ||
| 327 | AC_SUBST(INSTOBJEXT) | ||
| 328 | |||
| 329 | dnl For backward compatibility. Some Makefiles may be using this. | ||
| 330 | GENCAT=gencat | ||
| 331 | AC_SUBST(GENCAT) | ||
| 332 | |||
| 333 | dnl For backward compatibility. Some Makefiles may be using this. | ||
| 334 | INTLOBJS= | ||
| 335 | if test "$USE_INCLUDED_LIBINTL" = yes; then | ||
| 336 | INTLOBJS="\$(GETTOBJS)" | ||
| 337 | fi | ||
| 338 | AC_SUBST(INTLOBJS) | ||
| 339 | |||
| 340 | dnl Enable libtool support if the surrounding package wishes it. | ||
| 341 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | ||
| 342 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) | ||
| 343 | ]) | ||
| 344 | |||
| 345 | dnl For backward compatibility. Some Makefiles may be using this. | ||
| 346 | INTLLIBS="$LIBINTL" | ||
| 347 | AC_SUBST(INTLLIBS) | ||
| 348 | |||
| 349 | dnl Make all documented variables known to autoconf. | ||
| 350 | AC_SUBST(LIBINTL) | ||
| 351 | AC_SUBST(LTLIBINTL) | ||
| 352 | AC_SUBST(POSUB) | ||
| 353 | ]) | ||
| 354 | |||
| 355 | |||
| 356 | dnl Checks for all prerequisites of the intl subdirectory, | ||
| 357 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | ||
| 358 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
| 359 | AC_DEFUN([AM_INTL_SUBDIR], | ||
| 360 | [ | ||
| 361 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
| 362 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl | ||
| 363 | AC_REQUIRE([AC_PROG_CC])dnl | ||
| 364 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 365 | AC_REQUIRE([gt_GLIBC2])dnl | ||
| 366 | AC_REQUIRE([AC_PROG_RANLIB])dnl | ||
| 367 | AC_REQUIRE([AC_ISC_POSIX])dnl | ||
| 368 | AC_REQUIRE([AC_HEADER_STDC])dnl | ||
| 369 | AC_REQUIRE([AC_C_CONST])dnl | ||
| 370 | AC_REQUIRE([bh_C_SIGNED])dnl | ||
| 371 | AC_REQUIRE([AC_C_INLINE])dnl | ||
| 372 | AC_REQUIRE([AC_TYPE_OFF_T])dnl | ||
| 373 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
| 374 | AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl | ||
| 375 | AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl | ||
| 376 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | ||
| 377 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | ||
| 378 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
| 379 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
| 380 | AC_REQUIRE([gt_TYPE_INTMAX_T]) | ||
| 381 | AC_REQUIRE([gt_PRINTF_POSIX]) | ||
| 382 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | ||
| 383 | AC_REQUIRE([AC_FUNC_MMAP])dnl | ||
| 384 | AC_REQUIRE([gl_GLIBC21])dnl | ||
| 385 | AC_REQUIRE([gt_INTDIV0])dnl | ||
| 386 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl | ||
| 387 | AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl | ||
| 388 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | ||
| 389 | AC_REQUIRE([gl_XSIZE])dnl | ||
| 390 | AC_REQUIRE([gt_INTL_MACOSX])dnl | ||
| 391 | |||
| 392 | AC_CHECK_TYPE([ptrdiff_t], , | ||
| 393 | [AC_DEFINE([ptrdiff_t], [long], | ||
| 394 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | ||
| 395 | ]) | ||
| 396 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | ||
| 397 | stdlib.h string.h unistd.h sys/param.h]) | ||
| 398 | AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ | ||
| 399 | mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ | ||
| 400 | strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ | ||
| 401 | __fsetlocking]) | ||
| 402 | |||
| 403 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | ||
| 404 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | ||
| 405 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | ||
| 406 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
| 407 | |||
| 408 | dnl Use the *_unlocked functions only if they are declared. | ||
| 409 | dnl (because some of them were defined without being declared in Solaris | ||
| 410 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | ||
| 411 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | ||
| 412 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | ||
| 413 | gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) | ||
| 414 | gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) | ||
| 415 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
| 416 | |||
| 417 | case $gt_cv_func_printf_posix in | ||
| 418 | *yes) HAVE_POSIX_PRINTF=1 ;; | ||
| 419 | *) HAVE_POSIX_PRINTF=0 ;; | ||
| 420 | esac | ||
| 421 | AC_SUBST([HAVE_POSIX_PRINTF]) | ||
| 422 | if test "$ac_cv_func_asprintf" = yes; then | ||
| 423 | HAVE_ASPRINTF=1 | ||
| 424 | else | ||
| 425 | HAVE_ASPRINTF=0 | ||
| 426 | fi | ||
| 427 | AC_SUBST([HAVE_ASPRINTF]) | ||
| 428 | if test "$ac_cv_func_snprintf" = yes; then | ||
| 429 | HAVE_SNPRINTF=1 | ||
| 430 | else | ||
| 431 | HAVE_SNPRINTF=0 | ||
| 432 | fi | ||
| 433 | AC_SUBST([HAVE_SNPRINTF]) | ||
| 434 | if test "$ac_cv_func_wprintf" = yes; then | ||
| 435 | HAVE_WPRINTF=1 | ||
| 436 | else | ||
| 437 | HAVE_WPRINTF=0 | ||
| 438 | fi | ||
| 439 | AC_SUBST([HAVE_WPRINTF]) | ||
| 440 | |||
| 441 | AM_ICONV | ||
| 442 | AM_LANGINFO_CODESET | ||
| 443 | if test $ac_cv_header_locale_h = yes; then | ||
| 444 | gt_LC_MESSAGES | ||
| 445 | fi | ||
| 446 | |||
| 447 | if test -n "$INTL_MACOSX_LIBS"; then | ||
| 448 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
| 449 | fi | ||
| 450 | |||
| 451 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | ||
| 452 | dnl because plural.y uses bison specific features. It requires at least | ||
| 453 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | ||
| 454 | dnl compile. | ||
| 455 | dnl bison is only needed for the maintainer (who touches plural.y). But in | ||
| 456 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | ||
| 457 | dnl the rule in general Makefile. Now, some people carelessly touch the | ||
| 458 | dnl files or have a broken "make" program, hence the plural.c rule will | ||
| 459 | dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not | ||
| 460 | dnl present or too old. | ||
| 461 | AC_CHECK_PROGS([INTLBISON], [bison]) | ||
| 462 | if test -z "$INTLBISON"; then | ||
| 463 | ac_verc_fail=yes | ||
| 464 | else | ||
| 465 | dnl Found it, now check the version. | ||
| 466 | AC_MSG_CHECKING([version of bison]) | ||
| 467 | changequote(<<,>>)dnl | ||
| 468 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | ||
| 469 | case $ac_prog_version in | ||
| 470 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | ||
| 471 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | ||
| 472 | changequote([,])dnl | ||
| 473 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | ||
| 474 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | ||
| 475 | esac | ||
| 476 | AC_MSG_RESULT([$ac_prog_version]) | ||
| 477 | fi | ||
| 478 | if test $ac_verc_fail = yes; then | ||
| 479 | INTLBISON=: | ||
| 480 | fi | ||
| 481 | ]) | ||
| 482 | |||
| 483 | |||
| 484 | dnl Checks for special options needed on MacOS X. | ||
| 485 | dnl Defines INTL_MACOSX_LIBS. | ||
| 486 | AC_DEFUN([gt_INTL_MACOSX], | ||
| 487 | [ | ||
| 488 | dnl Check for API introduced in MacOS X 10.2. | ||
| 489 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], | ||
| 490 | gt_cv_func_CFPreferencesCopyAppValue, | ||
| 491 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
| 492 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
| 493 | gt_save_LIBS="$LIBS" | ||
| 494 | LIBS="$LIBS -framework CoreFoundation" | ||
| 495 | AC_TRY_LINK([#include <CFPreferences.h>], | ||
| 496 | [CFPreferencesCopyAppValue(NULL, NULL)], | ||
| 497 | [gt_cv_func_CFPreferencesCopyAppValue=yes], | ||
| 498 | [gt_cv_func_CFPreferencesCopyAppValue=no]) | ||
| 499 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
| 500 | LIBS="$gt_save_LIBS"]) | ||
| 501 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | ||
| 502 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, | ||
| 503 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) | ||
| 504 | fi | ||
| 505 | dnl Check for API introduced in MacOS X 10.3. | ||
| 506 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, | ||
| 507 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
| 508 | CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" | ||
| 509 | gt_save_LIBS="$LIBS" | ||
| 510 | LIBS="$LIBS -framework CoreFoundation" | ||
| 511 | AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();], | ||
| 512 | [gt_cv_func_CFLocaleCopyCurrent=yes], | ||
| 513 | [gt_cv_func_CFLocaleCopyCurrent=no]) | ||
| 514 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
| 515 | LIBS="$gt_save_LIBS"]) | ||
| 516 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
| 517 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, | ||
| 518 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) | ||
| 519 | fi | ||
| 520 | INTL_MACOSX_LIBS= | ||
| 521 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
| 522 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | ||
| 523 | fi | ||
| 524 | AC_SUBST([INTL_MACOSX_LIBS]) | ||
| 525 | ]) | ||
| 526 | |||
| 527 | |||
| 528 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | ||
| 529 | dnl Check whether a function is declared. | ||
| 530 | AC_DEFUN([gt_CHECK_DECL], | ||
| 531 | [ | ||
| 532 | AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, | ||
| 533 | [AC_TRY_COMPILE([$2], [ | ||
| 534 | #ifndef $1 | ||
| 535 | char *p = (char *) $1; | ||
| 536 | #endif | ||
| 537 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | ||
| 538 | if test $ac_cv_have_decl_$1 = yes; then | ||
| 539 | gt_value=1 | ||
| 540 | else | ||
| 541 | gt_value=0 | ||
| 542 | fi | ||
| 543 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
| 544 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
| 545 | ]) | ||
| 546 | |||
| 547 | |||
| 548 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) | ||
| 549 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) | ||
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index d95fd986..00000000 --- a/m4/glibc21.m4 +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | # glibc21.m4 serial 3 | ||
| 2 | dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | # Test for the GNU C Library, version 2.1 or newer. | ||
| 8 | # From Bruno Haible. | ||
| 9 | |||
| 10 | AC_DEFUN([gl_GLIBC21], | ||
| 11 | [ | ||
| 12 | AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, | ||
| 13 | ac_cv_gnu_library_2_1, | ||
| 14 | [AC_EGREP_CPP([Lucky GNU user], | ||
| 15 | [ | ||
| 16 | #include <features.h> | ||
| 17 | #ifdef __GNU_LIBRARY__ | ||
| 18 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | ||
| 19 | Lucky GNU user | ||
| 20 | #endif | ||
| 21 | #endif | ||
| 22 | ], | ||
| 23 | ac_cv_gnu_library_2_1=yes, | ||
| 24 | ac_cv_gnu_library_2_1=no) | ||
| 25 | ] | ||
| 26 | ) | ||
| 27 | AC_SUBST(GLIBC21) | ||
| 28 | GLIBC21="$ac_cv_gnu_library_2_1" | ||
| 29 | ] | ||
| 30 | ) | ||
diff --git a/m4/iconv.m4 b/m4/iconv.m4 deleted file mode 100644 index 654c4158..00000000 --- a/m4/iconv.m4 +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | # iconv.m4 serial AM4 (gettext-0.11.3) | ||
| 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | ||
| 10 | [ | ||
| 11 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
| 12 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 13 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 14 | |||
| 15 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
| 16 | dnl accordingly. | ||
| 17 | AC_LIB_LINKFLAGS_BODY([iconv]) | ||
| 18 | ]) | ||
| 19 | |||
| 20 | AC_DEFUN([AM_ICONV_LINK], | ||
| 21 | [ | ||
| 22 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | ||
| 23 | dnl those with the standalone portable GNU libiconv installed). | ||
| 24 | |||
| 25 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
| 26 | dnl accordingly. | ||
| 27 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
| 28 | |||
| 29 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, | ||
| 30 | dnl because if the user has installed libiconv and not disabled its use | ||
| 31 | dnl via --without-libiconv-prefix, he wants to use it. The first | ||
| 32 | dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. | ||
| 33 | am_save_CPPFLAGS="$CPPFLAGS" | ||
| 34 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | ||
| 35 | |||
| 36 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ | ||
| 37 | am_cv_func_iconv="no, consider installing GNU libiconv" | ||
| 38 | am_cv_lib_iconv=no | ||
| 39 | AC_TRY_LINK([#include <stdlib.h> | ||
| 40 | #include <iconv.h>], | ||
| 41 | [iconv_t cd = iconv_open("",""); | ||
| 42 | iconv(cd,NULL,NULL,NULL,NULL); | ||
| 43 | iconv_close(cd);], | ||
| 44 | am_cv_func_iconv=yes) | ||
| 45 | if test "$am_cv_func_iconv" != yes; then | ||
| 46 | am_save_LIBS="$LIBS" | ||
| 47 | LIBS="$LIBS $LIBICONV" | ||
| 48 | AC_TRY_LINK([#include <stdlib.h> | ||
| 49 | #include <iconv.h>], | ||
| 50 | [iconv_t cd = iconv_open("",""); | ||
| 51 | iconv(cd,NULL,NULL,NULL,NULL); | ||
| 52 | iconv_close(cd);], | ||
| 53 | am_cv_lib_iconv=yes | ||
| 54 | am_cv_func_iconv=yes) | ||
| 55 | LIBS="$am_save_LIBS" | ||
| 56 | fi | ||
| 57 | ]) | ||
| 58 | if test "$am_cv_func_iconv" = yes; then | ||
| 59 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) | ||
| 60 | fi | ||
| 61 | if test "$am_cv_lib_iconv" = yes; then | ||
| 62 | AC_MSG_CHECKING([how to link with libiconv]) | ||
| 63 | AC_MSG_RESULT([$LIBICONV]) | ||
| 64 | else | ||
| 65 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | ||
| 66 | dnl either. | ||
| 67 | CPPFLAGS="$am_save_CPPFLAGS" | ||
| 68 | LIBICONV= | ||
| 69 | LTLIBICONV= | ||
| 70 | fi | ||
| 71 | AC_SUBST(LIBICONV) | ||
| 72 | AC_SUBST(LTLIBICONV) | ||
| 73 | ]) | ||
| 74 | |||
| 75 | AC_DEFUN([AM_ICONV], | ||
| 76 | [ | ||
| 77 | AM_ICONV_LINK | ||
| 78 | if test "$am_cv_func_iconv" = yes; then | ||
| 79 | AC_MSG_CHECKING([for iconv declaration]) | ||
| 80 | AC_CACHE_VAL(am_cv_proto_iconv, [ | ||
| 81 | AC_TRY_COMPILE([ | ||
| 82 | #include <stdlib.h> | ||
| 83 | #include <iconv.h> | ||
| 84 | extern | ||
| 85 | #ifdef __cplusplus | ||
| 86 | "C" | ||
| 87 | #endif | ||
| 88 | #if defined(__STDC__) || defined(__cplusplus) | ||
| 89 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | ||
| 90 | #else | ||
| 91 | size_t iconv(); | ||
| 92 | #endif | ||
| 93 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") | ||
| 94 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) | ||
| 95 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | ||
| 96 | AC_MSG_RESULT([$]{ac_t:- | ||
| 97 | }[$]am_cv_proto_iconv) | ||
| 98 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, | ||
| 99 | [Define as const if the declaration of iconv() needs const.]) | ||
| 100 | fi | ||
| 101 | ]) | ||
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 deleted file mode 100644 index 4d56a9ad..00000000 --- a/m4/inttypes-pri.m4 +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | # inttypes-pri.m4 serial 1 (gettext-0.11.4) | ||
| 2 | dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | ||
| 10 | # macros to non-string values. This is the case on AIX 4.3.3. | ||
| 11 | |||
| 12 | AC_DEFUN([gt_INTTYPES_PRI], | ||
| 13 | [ | ||
| 14 | AC_REQUIRE([gt_HEADER_INTTYPES_H]) | ||
| 15 | if test $gt_cv_header_inttypes_h = yes; then | ||
| 16 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], | ||
| 17 | gt_cv_inttypes_pri_broken, | ||
| 18 | [ | ||
| 19 | AC_TRY_COMPILE([#include <inttypes.h> | ||
| 20 | #ifdef PRId32 | ||
| 21 | char *p = PRId32; | ||
| 22 | #endif | ||
| 23 | ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) | ||
| 24 | ]) | ||
| 25 | fi | ||
| 26 | if test "$gt_cv_inttypes_pri_broken" = yes; then | ||
| 27 | AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, | ||
| 28 | [Define if <inttypes.h> exists and defines unusable PRI* macros.]) | ||
| 29 | fi | ||
| 30 | ]) | ||
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 deleted file mode 100644 index 779bcea0..00000000 --- a/m4/inttypes.m4 +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | # inttypes.m4 serial 1 (gettext-0.11.4) | ||
| 2 | dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with | ||
| 10 | # <sys/types.h>. | ||
| 11 | |||
| 12 | AC_DEFUN([gt_HEADER_INTTYPES_H], | ||
| 13 | [ | ||
| 14 | AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, | ||
| 15 | [ | ||
| 16 | AC_TRY_COMPILE( | ||
| 17 | [#include <sys/types.h> | ||
| 18 | #include <inttypes.h>], | ||
| 19 | [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) | ||
| 20 | ]) | ||
| 21 | if test $gt_cv_header_inttypes_h = yes; then | ||
| 22 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, | ||
| 23 | [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) | ||
| 24 | fi | ||
| 25 | ]) | ||
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 deleted file mode 100644 index a5d075d9..00000000 --- a/m4/inttypes_h.m4 +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | # inttypes_h.m4 serial 6 | ||
| 2 | dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, | ||
| 10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
| 11 | |||
| 12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], | ||
| 13 | [ | ||
| 14 | AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, | ||
| 15 | [AC_TRY_COMPILE( | ||
| 16 | [#include <sys/types.h> | ||
| 17 | #include <inttypes.h>], | ||
| 18 | [uintmax_t i = (uintmax_t) -1;], | ||
| 19 | gl_cv_header_inttypes_h=yes, | ||
| 20 | gl_cv_header_inttypes_h=no)]) | ||
| 21 | if test $gl_cv_header_inttypes_h = yes; then | ||
| 22 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, | ||
| 23 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | ||
| 24 | and declares uintmax_t. ]) | ||
| 25 | fi | ||
| 26 | ]) | ||
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 deleted file mode 100644 index 96c4e2c3..00000000 --- a/m4/lib-ld.m4 +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | # lib-ld.m4 serial 3 (gettext-0.13) | ||
| 2 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl Subroutines of libtool.m4, | ||
| 8 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | ||
| 9 | dnl with libtool.m4. | ||
| 10 | |||
| 11 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | ||
| 12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], | ||
| 13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, | ||
| 14 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
| 15 | case `$LD -v 2>&1 </dev/null` in | ||
| 16 | *GNU* | *'with BFD'*) | ||
| 17 | acl_cv_prog_gnu_ld=yes ;; | ||
| 18 | *) | ||
| 19 | acl_cv_prog_gnu_ld=no ;; | ||
| 20 | esac]) | ||
| 21 | with_gnu_ld=$acl_cv_prog_gnu_ld | ||
| 22 | ]) | ||
| 23 | |||
| 24 | dnl From libtool-1.4. Sets the variable LD. | ||
| 25 | AC_DEFUN([AC_LIB_PROG_LD], | ||
| 26 | [AC_ARG_WITH(gnu-ld, | ||
| 27 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | ||
| 28 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | ||
| 29 | AC_REQUIRE([AC_PROG_CC])dnl | ||
| 30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 31 | # Prepare PATH_SEPARATOR. | ||
| 32 | # The user is always right. | ||
| 33 | if test "${PATH_SEPARATOR+set}" != set; then | ||
| 34 | echo "#! /bin/sh" >conf$$.sh | ||
| 35 | echo "exit 0" >>conf$$.sh | ||
| 36 | chmod +x conf$$.sh | ||
| 37 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | ||
| 38 | PATH_SEPARATOR=';' | ||
| 39 | else | ||
| 40 | PATH_SEPARATOR=: | ||
| 41 | fi | ||
| 42 | rm -f conf$$.sh | ||
| 43 | fi | ||
| 44 | ac_prog=ld | ||
| 45 | if test "$GCC" = yes; then | ||
| 46 | # Check if gcc -print-prog-name=ld gives a path. | ||
| 47 | AC_MSG_CHECKING([for ld used by GCC]) | ||
| 48 | case $host in | ||
| 49 | *-*-mingw*) | ||
| 50 | # gcc leaves a trailing carriage return which upsets mingw | ||
| 51 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
| 52 | *) | ||
| 53 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
| 54 | esac | ||
| 55 | case $ac_prog in | ||
| 56 | # Accept absolute paths. | ||
| 57 | [[\\/]* | [A-Za-z]:[\\/]*)] | ||
| 58 | [re_direlt='/[^/][^/]*/\.\./'] | ||
| 59 | # Canonicalize the path of ld | ||
| 60 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | ||
| 61 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | ||
| 62 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
| 63 | done | ||
| 64 | test -z "$LD" && LD="$ac_prog" | ||
| 65 | ;; | ||
| 66 | "") | ||
| 67 | # If it fails, then pretend we aren't using GCC. | ||
| 68 | ac_prog=ld | ||
| 69 | ;; | ||
| 70 | *) | ||
| 71 | # If it is relative, then search for the first ld in PATH. | ||
| 72 | with_gnu_ld=unknown | ||
| 73 | ;; | ||
| 74 | esac | ||
| 75 | elif test "$with_gnu_ld" = yes; then | ||
| 76 | AC_MSG_CHECKING([for GNU ld]) | ||
| 77 | else | ||
| 78 | AC_MSG_CHECKING([for non-GNU ld]) | ||
| 79 | fi | ||
| 80 | AC_CACHE_VAL(acl_cv_path_LD, | ||
| 81 | [if test -z "$LD"; then | ||
| 82 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | ||
| 83 | for ac_dir in $PATH; do | ||
| 84 | test -z "$ac_dir" && ac_dir=. | ||
| 85 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
| 86 | acl_cv_path_LD="$ac_dir/$ac_prog" | ||
| 87 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
| 88 | # but apparently some GNU ld's only accept -v. | ||
| 89 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
| 90 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in | ||
| 91 | *GNU* | *'with BFD'*) | ||
| 92 | test "$with_gnu_ld" != no && break ;; | ||
| 93 | *) | ||
| 94 | test "$with_gnu_ld" != yes && break ;; | ||
| 95 | esac | ||
| 96 | fi | ||
| 97 | done | ||
| 98 | IFS="$ac_save_ifs" | ||
| 99 | else | ||
| 100 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | ||
| 101 | fi]) | ||
| 102 | LD="$acl_cv_path_LD" | ||
| 103 | if test -n "$LD"; then | ||
| 104 | AC_MSG_RESULT($LD) | ||
| 105 | else | ||
| 106 | AC_MSG_RESULT(no) | ||
| 107 | fi | ||
| 108 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
| 109 | AC_LIB_PROG_LD_GNU | ||
| 110 | ]) | ||
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 deleted file mode 100644 index 244a7791..00000000 --- a/m4/lib-link.m4 +++ /dev/null | |||
| @@ -1,554 +0,0 @@ | |||
| 1 | # lib-link.m4 serial 7 (gettext-0.15) | ||
| 2 | dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | AC_PREREQ(2.50) | ||
| 10 | |||
| 11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | ||
| 12 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
| 13 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | ||
| 14 | dnl augments the CPPFLAGS variable. | ||
| 15 | AC_DEFUN([AC_LIB_LINKFLAGS], | ||
| 16 | [ | ||
| 17 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 18 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 19 | define([Name],[translit([$1],[./-], [___])]) | ||
| 20 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
| 21 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
| 22 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | ||
| 23 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
| 24 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" | ||
| 25 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | ||
| 26 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | ||
| 27 | ]) | ||
| 28 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" | ||
| 29 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | ||
| 30 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | ||
| 31 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
| 32 | AC_SUBST([LIB]NAME) | ||
| 33 | AC_SUBST([LTLIB]NAME) | ||
| 34 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | ||
| 35 | dnl results of this search when this library appears as a dependency. | ||
| 36 | HAVE_LIB[]NAME=yes | ||
| 37 | undefine([Name]) | ||
| 38 | undefine([NAME]) | ||
| 39 | ]) | ||
| 40 | |||
| 41 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) | ||
| 42 | dnl searches for libname and the libraries corresponding to explicit and | ||
| 43 | dnl implicit dependencies, together with the specified include files and | ||
| 44 | dnl the ability to compile and link the specified testcode. If found, it | ||
| 45 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and | ||
| 46 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
| 47 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | ||
| 48 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | ||
| 49 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | ||
| 50 | [ | ||
| 51 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 52 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 53 | define([Name],[translit([$1],[./-], [___])]) | ||
| 54 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
| 55 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
| 56 | |||
| 57 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | ||
| 58 | dnl accordingly. | ||
| 59 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
| 60 | |||
| 61 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, | ||
| 62 | dnl because if the user has installed lib[]Name and not disabled its use | ||
| 63 | dnl via --without-lib[]Name-prefix, he wants to use it. | ||
| 64 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
| 65 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
| 66 | |||
| 67 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | ||
| 68 | ac_save_LIBS="$LIBS" | ||
| 69 | LIBS="$LIBS $LIB[]NAME" | ||
| 70 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | ||
| 71 | LIBS="$ac_save_LIBS" | ||
| 72 | ]) | ||
| 73 | if test "$ac_cv_lib[]Name" = yes; then | ||
| 74 | HAVE_LIB[]NAME=yes | ||
| 75 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) | ||
| 76 | AC_MSG_CHECKING([how to link with lib[]$1]) | ||
| 77 | AC_MSG_RESULT([$LIB[]NAME]) | ||
| 78 | else | ||
| 79 | HAVE_LIB[]NAME=no | ||
| 80 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need | ||
| 81 | dnl $INC[]NAME either. | ||
| 82 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
| 83 | LIB[]NAME= | ||
| 84 | LTLIB[]NAME= | ||
| 85 | fi | ||
| 86 | AC_SUBST([HAVE_LIB]NAME) | ||
| 87 | AC_SUBST([LIB]NAME) | ||
| 88 | AC_SUBST([LTLIB]NAME) | ||
| 89 | undefine([Name]) | ||
| 90 | undefine([NAME]) | ||
| 91 | ]) | ||
| 92 | |||
| 93 | dnl Determine the platform dependent parameters needed to use rpath: | ||
| 94 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, | ||
| 95 | dnl hardcode_direct, hardcode_minus_L. | ||
| 96 | AC_DEFUN([AC_LIB_RPATH], | ||
| 97 | [ | ||
| 98 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. | ||
| 99 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) | ||
| 100 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS | ||
| 101 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | ||
| 102 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | ||
| 103 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | ||
| 104 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ | ||
| 105 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | ||
| 106 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | ||
| 107 | . ./conftest.sh | ||
| 108 | rm -f ./conftest.sh | ||
| 109 | acl_cv_rpath=done | ||
| 110 | ]) | ||
| 111 | wl="$acl_cv_wl" | ||
| 112 | libext="$acl_cv_libext" | ||
| 113 | shlibext="$acl_cv_shlibext" | ||
| 114 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | ||
| 115 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | ||
| 116 | hardcode_direct="$acl_cv_hardcode_direct" | ||
| 117 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | ||
| 118 | dnl Determine whether the user wants rpath handling at all. | ||
| 119 | AC_ARG_ENABLE(rpath, | ||
| 120 | [ --disable-rpath do not hardcode runtime library paths], | ||
| 121 | :, enable_rpath=yes) | ||
| 122 | ]) | ||
| 123 | |||
| 124 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | ||
| 125 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
| 126 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | ||
| 127 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | ||
| 128 | [ | ||
| 129 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
| 130 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
| 131 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
| 132 | dnl By default, look in $includedir and $libdir. | ||
| 133 | use_additional=yes | ||
| 134 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 135 | eval additional_includedir=\"$includedir\" | ||
| 136 | eval additional_libdir=\"$libdir\" | ||
| 137 | ]) | ||
| 138 | AC_LIB_ARG_WITH([lib$1-prefix], | ||
| 139 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | ||
| 140 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], | ||
| 141 | [ | ||
| 142 | if test "X$withval" = "Xno"; then | ||
| 143 | use_additional=no | ||
| 144 | else | ||
| 145 | if test "X$withval" = "X"; then | ||
| 146 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 147 | eval additional_includedir=\"$includedir\" | ||
| 148 | eval additional_libdir=\"$libdir\" | ||
| 149 | ]) | ||
| 150 | else | ||
| 151 | additional_includedir="$withval/include" | ||
| 152 | additional_libdir="$withval/$acl_libdirstem" | ||
| 153 | fi | ||
| 154 | fi | ||
| 155 | ]) | ||
| 156 | dnl Search the library and its dependencies in $additional_libdir and | ||
| 157 | dnl $LDFLAGS. Using breadth-first-seach. | ||
| 158 | LIB[]NAME= | ||
| 159 | LTLIB[]NAME= | ||
| 160 | INC[]NAME= | ||
| 161 | rpathdirs= | ||
| 162 | ltrpathdirs= | ||
| 163 | names_already_handled= | ||
| 164 | names_next_round='$1 $2' | ||
| 165 | while test -n "$names_next_round"; do | ||
| 166 | names_this_round="$names_next_round" | ||
| 167 | names_next_round= | ||
| 168 | for name in $names_this_round; do | ||
| 169 | already_handled= | ||
| 170 | for n in $names_already_handled; do | ||
| 171 | if test "$n" = "$name"; then | ||
| 172 | already_handled=yes | ||
| 173 | break | ||
| 174 | fi | ||
| 175 | done | ||
| 176 | if test -z "$already_handled"; then | ||
| 177 | names_already_handled="$names_already_handled $name" | ||
| 178 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | ||
| 179 | dnl or AC_LIB_HAVE_LINKFLAGS call. | ||
| 180 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | ||
| 181 | eval value=\"\$HAVE_LIB$uppername\" | ||
| 182 | if test -n "$value"; then | ||
| 183 | if test "$value" = yes; then | ||
| 184 | eval value=\"\$LIB$uppername\" | ||
| 185 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" | ||
| 186 | eval value=\"\$LTLIB$uppername\" | ||
| 187 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" | ||
| 188 | else | ||
| 189 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined | ||
| 190 | dnl that this library doesn't exist. So just drop it. | ||
| 191 | : | ||
| 192 | fi | ||
| 193 | else | ||
| 194 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS | ||
| 195 | dnl and the already constructed $LIBNAME/$LTLIBNAME. | ||
| 196 | found_dir= | ||
| 197 | found_la= | ||
| 198 | found_so= | ||
| 199 | found_a= | ||
| 200 | if test $use_additional = yes; then | ||
| 201 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | ||
| 202 | found_dir="$additional_libdir" | ||
| 203 | found_so="$additional_libdir/lib$name.$shlibext" | ||
| 204 | if test -f "$additional_libdir/lib$name.la"; then | ||
| 205 | found_la="$additional_libdir/lib$name.la" | ||
| 206 | fi | ||
| 207 | else | ||
| 208 | if test -f "$additional_libdir/lib$name.$libext"; then | ||
| 209 | found_dir="$additional_libdir" | ||
| 210 | found_a="$additional_libdir/lib$name.$libext" | ||
| 211 | if test -f "$additional_libdir/lib$name.la"; then | ||
| 212 | found_la="$additional_libdir/lib$name.la" | ||
| 213 | fi | ||
| 214 | fi | ||
| 215 | fi | ||
| 216 | fi | ||
| 217 | if test "X$found_dir" = "X"; then | ||
| 218 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
| 219 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 220 | case "$x" in | ||
| 221 | -L*) | ||
| 222 | dir=`echo "X$x" | sed -e 's/^X-L//'` | ||
| 223 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | ||
| 224 | found_dir="$dir" | ||
| 225 | found_so="$dir/lib$name.$shlibext" | ||
| 226 | if test -f "$dir/lib$name.la"; then | ||
| 227 | found_la="$dir/lib$name.la" | ||
| 228 | fi | ||
| 229 | else | ||
| 230 | if test -f "$dir/lib$name.$libext"; then | ||
| 231 | found_dir="$dir" | ||
| 232 | found_a="$dir/lib$name.$libext" | ||
| 233 | if test -f "$dir/lib$name.la"; then | ||
| 234 | found_la="$dir/lib$name.la" | ||
| 235 | fi | ||
| 236 | fi | ||
| 237 | fi | ||
| 238 | ;; | ||
| 239 | esac | ||
| 240 | if test "X$found_dir" != "X"; then | ||
| 241 | break | ||
| 242 | fi | ||
| 243 | done | ||
| 244 | fi | ||
| 245 | if test "X$found_dir" != "X"; then | ||
| 246 | dnl Found the library. | ||
| 247 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" | ||
| 248 | if test "X$found_so" != "X"; then | ||
| 249 | dnl Linking with a shared library. We attempt to hardcode its | ||
| 250 | dnl directory into the executable's runpath, unless it's the | ||
| 251 | dnl standard /usr/lib. | ||
| 252 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then | ||
| 253 | dnl No hardcoding is needed. | ||
| 254 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 255 | else | ||
| 256 | dnl Use an explicit option to hardcode DIR into the resulting | ||
| 257 | dnl binary. | ||
| 258 | dnl Potentially add DIR to ltrpathdirs. | ||
| 259 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
| 260 | haveit= | ||
| 261 | for x in $ltrpathdirs; do | ||
| 262 | if test "X$x" = "X$found_dir"; then | ||
| 263 | haveit=yes | ||
| 264 | break | ||
| 265 | fi | ||
| 266 | done | ||
| 267 | if test -z "$haveit"; then | ||
| 268 | ltrpathdirs="$ltrpathdirs $found_dir" | ||
| 269 | fi | ||
| 270 | dnl The hardcoding into $LIBNAME is system dependent. | ||
| 271 | if test "$hardcode_direct" = yes; then | ||
| 272 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the | ||
| 273 | dnl resulting binary. | ||
| 274 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 275 | else | ||
| 276 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | ||
| 277 | dnl Use an explicit option to hardcode DIR into the resulting | ||
| 278 | dnl binary. | ||
| 279 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 280 | dnl Potentially add DIR to rpathdirs. | ||
| 281 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
| 282 | haveit= | ||
| 283 | for x in $rpathdirs; do | ||
| 284 | if test "X$x" = "X$found_dir"; then | ||
| 285 | haveit=yes | ||
| 286 | break | ||
| 287 | fi | ||
| 288 | done | ||
| 289 | if test -z "$haveit"; then | ||
| 290 | rpathdirs="$rpathdirs $found_dir" | ||
| 291 | fi | ||
| 292 | else | ||
| 293 | dnl Rely on "-L$found_dir". | ||
| 294 | dnl But don't add it if it's already contained in the LDFLAGS | ||
| 295 | dnl or the already constructed $LIBNAME | ||
| 296 | haveit= | ||
| 297 | for x in $LDFLAGS $LIB[]NAME; do | ||
| 298 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 299 | if test "X$x" = "X-L$found_dir"; then | ||
| 300 | haveit=yes | ||
| 301 | break | ||
| 302 | fi | ||
| 303 | done | ||
| 304 | if test -z "$haveit"; then | ||
| 305 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | ||
| 306 | fi | ||
| 307 | if test "$hardcode_minus_L" != no; then | ||
| 308 | dnl FIXME: Not sure whether we should use | ||
| 309 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
| 310 | dnl here. | ||
| 311 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 312 | else | ||
| 313 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH | ||
| 314 | dnl here, because this doesn't fit in flags passed to the | ||
| 315 | dnl compiler. So give up. No hardcoding. This affects only | ||
| 316 | dnl very old systems. | ||
| 317 | dnl FIXME: Not sure whether we should use | ||
| 318 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
| 319 | dnl here. | ||
| 320 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
| 321 | fi | ||
| 322 | fi | ||
| 323 | fi | ||
| 324 | fi | ||
| 325 | else | ||
| 326 | if test "X$found_a" != "X"; then | ||
| 327 | dnl Linking with a static library. | ||
| 328 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" | ||
| 329 | else | ||
| 330 | dnl We shouldn't come here, but anyway it's good to have a | ||
| 331 | dnl fallback. | ||
| 332 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" | ||
| 333 | fi | ||
| 334 | fi | ||
| 335 | dnl Assume the include files are nearby. | ||
| 336 | additional_includedir= | ||
| 337 | case "$found_dir" in | ||
| 338 | */$acl_libdirstem | */$acl_libdirstem/) | ||
| 339 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | ||
| 340 | additional_includedir="$basedir/include" | ||
| 341 | ;; | ||
| 342 | esac | ||
| 343 | if test "X$additional_includedir" != "X"; then | ||
| 344 | dnl Potentially add $additional_includedir to $INCNAME. | ||
| 345 | dnl But don't add it | ||
| 346 | dnl 1. if it's the standard /usr/include, | ||
| 347 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, | ||
| 348 | dnl 3. if it's already present in $CPPFLAGS or the already | ||
| 349 | dnl constructed $INCNAME, | ||
| 350 | dnl 4. if it doesn't exist as a directory. | ||
| 351 | if test "X$additional_includedir" != "X/usr/include"; then | ||
| 352 | haveit= | ||
| 353 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
| 354 | if test -n "$GCC"; then | ||
| 355 | case $host_os in | ||
| 356 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 357 | esac | ||
| 358 | fi | ||
| 359 | fi | ||
| 360 | if test -z "$haveit"; then | ||
| 361 | for x in $CPPFLAGS $INC[]NAME; do | ||
| 362 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 363 | if test "X$x" = "X-I$additional_includedir"; then | ||
| 364 | haveit=yes | ||
| 365 | break | ||
| 366 | fi | ||
| 367 | done | ||
| 368 | if test -z "$haveit"; then | ||
| 369 | if test -d "$additional_includedir"; then | ||
| 370 | dnl Really add $additional_includedir to $INCNAME. | ||
| 371 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" | ||
| 372 | fi | ||
| 373 | fi | ||
| 374 | fi | ||
| 375 | fi | ||
| 376 | fi | ||
| 377 | dnl Look for dependencies. | ||
| 378 | if test -n "$found_la"; then | ||
| 379 | dnl Read the .la file. It defines the variables | ||
| 380 | dnl dlname, library_names, old_library, dependency_libs, current, | ||
| 381 | dnl age, revision, installed, dlopen, dlpreopen, libdir. | ||
| 382 | save_libdir="$libdir" | ||
| 383 | case "$found_la" in | ||
| 384 | */* | *\\*) . "$found_la" ;; | ||
| 385 | *) . "./$found_la" ;; | ||
| 386 | esac | ||
| 387 | libdir="$save_libdir" | ||
| 388 | dnl We use only dependency_libs. | ||
| 389 | for dep in $dependency_libs; do | ||
| 390 | case "$dep" in | ||
| 391 | -L*) | ||
| 392 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | ||
| 393 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | ||
| 394 | dnl But don't add it | ||
| 395 | dnl 1. if it's the standard /usr/lib, | ||
| 396 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, | ||
| 397 | dnl 3. if it's already present in $LDFLAGS or the already | ||
| 398 | dnl constructed $LIBNAME, | ||
| 399 | dnl 4. if it doesn't exist as a directory. | ||
| 400 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | ||
| 401 | haveit= | ||
| 402 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | ||
| 403 | if test -n "$GCC"; then | ||
| 404 | case $host_os in | ||
| 405 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 406 | esac | ||
| 407 | fi | ||
| 408 | fi | ||
| 409 | if test -z "$haveit"; then | ||
| 410 | haveit= | ||
| 411 | for x in $LDFLAGS $LIB[]NAME; do | ||
| 412 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 413 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 414 | haveit=yes | ||
| 415 | break | ||
| 416 | fi | ||
| 417 | done | ||
| 418 | if test -z "$haveit"; then | ||
| 419 | if test -d "$additional_libdir"; then | ||
| 420 | dnl Really add $additional_libdir to $LIBNAME. | ||
| 421 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | ||
| 422 | fi | ||
| 423 | fi | ||
| 424 | haveit= | ||
| 425 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
| 426 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 427 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 428 | haveit=yes | ||
| 429 | break | ||
| 430 | fi | ||
| 431 | done | ||
| 432 | if test -z "$haveit"; then | ||
| 433 | if test -d "$additional_libdir"; then | ||
| 434 | dnl Really add $additional_libdir to $LTLIBNAME. | ||
| 435 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | ||
| 436 | fi | ||
| 437 | fi | ||
| 438 | fi | ||
| 439 | fi | ||
| 440 | ;; | ||
| 441 | -R*) | ||
| 442 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | ||
| 443 | if test "$enable_rpath" != no; then | ||
| 444 | dnl Potentially add DIR to rpathdirs. | ||
| 445 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
| 446 | haveit= | ||
| 447 | for x in $rpathdirs; do | ||
| 448 | if test "X$x" = "X$dir"; then | ||
| 449 | haveit=yes | ||
| 450 | break | ||
| 451 | fi | ||
| 452 | done | ||
| 453 | if test -z "$haveit"; then | ||
| 454 | rpathdirs="$rpathdirs $dir" | ||
| 455 | fi | ||
| 456 | dnl Potentially add DIR to ltrpathdirs. | ||
| 457 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
| 458 | haveit= | ||
| 459 | for x in $ltrpathdirs; do | ||
| 460 | if test "X$x" = "X$dir"; then | ||
| 461 | haveit=yes | ||
| 462 | break | ||
| 463 | fi | ||
| 464 | done | ||
| 465 | if test -z "$haveit"; then | ||
| 466 | ltrpathdirs="$ltrpathdirs $dir" | ||
| 467 | fi | ||
| 468 | fi | ||
| 469 | ;; | ||
| 470 | -l*) | ||
| 471 | dnl Handle this in the next round. | ||
| 472 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | ||
| 473 | ;; | ||
| 474 | *.la) | ||
| 475 | dnl Handle this in the next round. Throw away the .la's | ||
| 476 | dnl directory; it is already contained in a preceding -L | ||
| 477 | dnl option. | ||
| 478 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | ||
| 479 | ;; | ||
| 480 | *) | ||
| 481 | dnl Most likely an immediate library name. | ||
| 482 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" | ||
| 483 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" | ||
| 484 | ;; | ||
| 485 | esac | ||
| 486 | done | ||
| 487 | fi | ||
| 488 | else | ||
| 489 | dnl Didn't find the library; assume it is in the system directories | ||
| 490 | dnl known to the linker and runtime loader. (All the system | ||
| 491 | dnl directories known to the linker should also be known to the | ||
| 492 | dnl runtime loader, otherwise the system is severely misconfigured.) | ||
| 493 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
| 494 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" | ||
| 495 | fi | ||
| 496 | fi | ||
| 497 | fi | ||
| 498 | done | ||
| 499 | done | ||
| 500 | if test "X$rpathdirs" != "X"; then | ||
| 501 | if test -n "$hardcode_libdir_separator"; then | ||
| 502 | dnl Weird platform: only the last -rpath option counts, the user must | ||
| 503 | dnl pass all path elements in one option. We can arrange that for a | ||
| 504 | dnl single library, but not when more than one $LIBNAMEs are used. | ||
| 505 | alldirs= | ||
| 506 | for found_dir in $rpathdirs; do | ||
| 507 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | ||
| 508 | done | ||
| 509 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. | ||
| 510 | acl_save_libdir="$libdir" | ||
| 511 | libdir="$alldirs" | ||
| 512 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
| 513 | libdir="$acl_save_libdir" | ||
| 514 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
| 515 | else | ||
| 516 | dnl The -rpath options are cumulative. | ||
| 517 | for found_dir in $rpathdirs; do | ||
| 518 | acl_save_libdir="$libdir" | ||
| 519 | libdir="$found_dir" | ||
| 520 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
| 521 | libdir="$acl_save_libdir" | ||
| 522 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
| 523 | done | ||
| 524 | fi | ||
| 525 | fi | ||
| 526 | if test "X$ltrpathdirs" != "X"; then | ||
| 527 | dnl When using libtool, the option that works for both libraries and | ||
| 528 | dnl executables is -R. The -R options are cumulative. | ||
| 529 | for found_dir in $ltrpathdirs; do | ||
| 530 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | ||
| 531 | done | ||
| 532 | fi | ||
| 533 | ]) | ||
| 534 | |||
| 535 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | ||
| 536 | dnl unless already present in VAR. | ||
| 537 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes | ||
| 538 | dnl contains two or three consecutive elements that belong together. | ||
| 539 | AC_DEFUN([AC_LIB_APPENDTOVAR], | ||
| 540 | [ | ||
| 541 | for element in [$2]; do | ||
| 542 | haveit= | ||
| 543 | for x in $[$1]; do | ||
| 544 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 545 | if test "X$x" = "X$element"; then | ||
| 546 | haveit=yes | ||
| 547 | break | ||
| 548 | fi | ||
| 549 | done | ||
| 550 | if test -z "$haveit"; then | ||
| 551 | [$1]="${[$1]}${[$1]:+ }$element" | ||
| 552 | fi | ||
| 553 | done | ||
| 554 | ]) | ||
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 deleted file mode 100644 index a8684e17..00000000 --- a/m4/lib-prefix.m4 +++ /dev/null | |||
| @@ -1,185 +0,0 @@ | |||
| 1 | # lib-prefix.m4 serial 5 (gettext-0.15) | ||
| 2 | dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | ||
| 10 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | ||
| 11 | dnl require excessive bracketing. | ||
| 12 | ifdef([AC_HELP_STRING], | ||
| 13 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], | ||
| 14 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) | ||
| 15 | |||
| 16 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed | ||
| 17 | dnl to access previously installed libraries. The basic assumption is that | ||
| 18 | dnl a user will want packages to use other packages he previously installed | ||
| 19 | dnl with the same --prefix option. | ||
| 20 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate | ||
| 21 | dnl libraries, but is otherwise very convenient. | ||
| 22 | AC_DEFUN([AC_LIB_PREFIX], | ||
| 23 | [ | ||
| 24 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | ||
| 25 | AC_REQUIRE([AC_PROG_CC]) | ||
| 26 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 27 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
| 28 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 29 | dnl By default, look in $includedir and $libdir. | ||
| 30 | use_additional=yes | ||
| 31 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 32 | eval additional_includedir=\"$includedir\" | ||
| 33 | eval additional_libdir=\"$libdir\" | ||
| 34 | ]) | ||
| 35 | AC_LIB_ARG_WITH([lib-prefix], | ||
| 36 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | ||
| 37 | --without-lib-prefix don't search for libraries in includedir and libdir], | ||
| 38 | [ | ||
| 39 | if test "X$withval" = "Xno"; then | ||
| 40 | use_additional=no | ||
| 41 | else | ||
| 42 | if test "X$withval" = "X"; then | ||
| 43 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 44 | eval additional_includedir=\"$includedir\" | ||
| 45 | eval additional_libdir=\"$libdir\" | ||
| 46 | ]) | ||
| 47 | else | ||
| 48 | additional_includedir="$withval/include" | ||
| 49 | additional_libdir="$withval/$acl_libdirstem" | ||
| 50 | fi | ||
| 51 | fi | ||
| 52 | ]) | ||
| 53 | if test $use_additional = yes; then | ||
| 54 | dnl Potentially add $additional_includedir to $CPPFLAGS. | ||
| 55 | dnl But don't add it | ||
| 56 | dnl 1. if it's the standard /usr/include, | ||
| 57 | dnl 2. if it's already present in $CPPFLAGS, | ||
| 58 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, | ||
| 59 | dnl 4. if it doesn't exist as a directory. | ||
| 60 | if test "X$additional_includedir" != "X/usr/include"; then | ||
| 61 | haveit= | ||
| 62 | for x in $CPPFLAGS; do | ||
| 63 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 64 | if test "X$x" = "X-I$additional_includedir"; then | ||
| 65 | haveit=yes | ||
| 66 | break | ||
| 67 | fi | ||
| 68 | done | ||
| 69 | if test -z "$haveit"; then | ||
| 70 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
| 71 | if test -n "$GCC"; then | ||
| 72 | case $host_os in | ||
| 73 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 74 | esac | ||
| 75 | fi | ||
| 76 | fi | ||
| 77 | if test -z "$haveit"; then | ||
| 78 | if test -d "$additional_includedir"; then | ||
| 79 | dnl Really add $additional_includedir to $CPPFLAGS. | ||
| 80 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" | ||
| 81 | fi | ||
| 82 | fi | ||
| 83 | fi | ||
| 84 | fi | ||
| 85 | dnl Potentially add $additional_libdir to $LDFLAGS. | ||
| 86 | dnl But don't add it | ||
| 87 | dnl 1. if it's the standard /usr/lib, | ||
| 88 | dnl 2. if it's already present in $LDFLAGS, | ||
| 89 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | ||
| 90 | dnl 4. if it doesn't exist as a directory. | ||
| 91 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | ||
| 92 | haveit= | ||
| 93 | for x in $LDFLAGS; do | ||
| 94 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 95 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 96 | haveit=yes | ||
| 97 | break | ||
| 98 | fi | ||
| 99 | done | ||
| 100 | if test -z "$haveit"; then | ||
| 101 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | ||
| 102 | if test -n "$GCC"; then | ||
| 103 | case $host_os in | ||
| 104 | linux*) haveit=yes;; | ||
| 105 | esac | ||
| 106 | fi | ||
| 107 | fi | ||
| 108 | if test -z "$haveit"; then | ||
| 109 | if test -d "$additional_libdir"; then | ||
| 110 | dnl Really add $additional_libdir to $LDFLAGS. | ||
| 111 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" | ||
| 112 | fi | ||
| 113 | fi | ||
| 114 | fi | ||
| 115 | fi | ||
| 116 | fi | ||
| 117 | ]) | ||
| 118 | |||
| 119 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, | ||
| 120 | dnl acl_final_exec_prefix, containing the values to which $prefix and | ||
| 121 | dnl $exec_prefix will expand at the end of the configure script. | ||
| 122 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], | ||
| 123 | [ | ||
| 124 | dnl Unfortunately, prefix and exec_prefix get only finally determined | ||
| 125 | dnl at the end of configure. | ||
| 126 | if test "X$prefix" = "XNONE"; then | ||
| 127 | acl_final_prefix="$ac_default_prefix" | ||
| 128 | else | ||
| 129 | acl_final_prefix="$prefix" | ||
| 130 | fi | ||
| 131 | if test "X$exec_prefix" = "XNONE"; then | ||
| 132 | acl_final_exec_prefix='${prefix}' | ||
| 133 | else | ||
| 134 | acl_final_exec_prefix="$exec_prefix" | ||
| 135 | fi | ||
| 136 | acl_save_prefix="$prefix" | ||
| 137 | prefix="$acl_final_prefix" | ||
| 138 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | ||
| 139 | prefix="$acl_save_prefix" | ||
| 140 | ]) | ||
| 141 | |||
| 142 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the | ||
| 143 | dnl variables prefix and exec_prefix bound to the values they will have | ||
| 144 | dnl at the end of the configure script. | ||
| 145 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | ||
| 146 | [ | ||
| 147 | acl_save_prefix="$prefix" | ||
| 148 | prefix="$acl_final_prefix" | ||
| 149 | acl_save_exec_prefix="$exec_prefix" | ||
| 150 | exec_prefix="$acl_final_exec_prefix" | ||
| 151 | $1 | ||
| 152 | exec_prefix="$acl_save_exec_prefix" | ||
| 153 | prefix="$acl_save_prefix" | ||
| 154 | ]) | ||
| 155 | |||
| 156 | dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | ||
| 157 | dnl the basename of the libdir, either "lib" or "lib64". | ||
| 158 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | ||
| 159 | [ | ||
| 160 | dnl There is no formal standard regarding lib and lib64. The current | ||
| 161 | dnl practice is that on a system supporting 32-bit and 64-bit instruction | ||
| 162 | dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | ||
| 163 | dnl libraries go under $prefix/lib. We determine the compiler's default | ||
| 164 | dnl mode by looking at the compiler's library search path. If at least | ||
| 165 | dnl of its elements ends in /lib64 or points to a directory whose absolute | ||
| 166 | dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | ||
| 167 | dnl default, namely "lib". | ||
| 168 | acl_libdirstem=lib | ||
| 169 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | ||
| 170 | if test -n "$searchpath"; then | ||
| 171 | acl_save_IFS="${IFS= }"; IFS=":" | ||
| 172 | for searchdir in $searchpath; do | ||
| 173 | if test -d "$searchdir"; then | ||
| 174 | case "$searchdir" in | ||
| 175 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | ||
| 176 | *) searchdir=`cd "$searchdir" && pwd` | ||
| 177 | case "$searchdir" in | ||
| 178 | */lib64 ) acl_libdirstem=lib64 ;; | ||
| 179 | esac ;; | ||
| 180 | esac | ||
| 181 | fi | ||
| 182 | done | ||
| 183 | IFS="$acl_save_IFS" | ||
| 184 | fi | ||
| 185 | ]) | ||
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4 deleted file mode 100644 index 40cd7ce0..00000000 --- a/m4/longdouble.m4 +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | # longdouble.m4 serial 1 (gettext-0.12) | ||
| 2 | dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | dnl Test whether the compiler supports the 'long double' type. | ||
| 9 | dnl Prerequisite: AC_PROG_CC | ||
| 10 | |||
| 11 | AC_DEFUN([gt_TYPE_LONGDOUBLE], | ||
| 12 | [ | ||
| 13 | AC_CACHE_CHECK([for long double], gt_cv_c_long_double, | ||
| 14 | [if test "$GCC" = yes; then | ||
| 15 | gt_cv_c_long_double=yes | ||
| 16 | else | ||
| 17 | AC_TRY_COMPILE([ | ||
| 18 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ | ||
| 19 | long double foo = 0.0; | ||
| 20 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | ||
| 21 | int array [2*(sizeof(long double) >= sizeof(double)) - 1]; | ||
| 22 | ], , | ||
| 23 | gt_cv_c_long_double=yes, gt_cv_c_long_double=no) | ||
| 24 | fi]) | ||
| 25 | if test $gt_cv_c_long_double = yes; then | ||
| 26 | AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) | ||
| 27 | fi | ||
| 28 | ]) | ||
diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index 7b399e01..00000000 --- a/m4/longlong.m4 +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | # longlong.m4 serial 5 | ||
| 2 | dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | # Define HAVE_LONG_LONG if 'long long' works. | ||
| 10 | |||
| 11 | AC_DEFUN([gl_AC_TYPE_LONG_LONG], | ||
| 12 | [ | ||
| 13 | AC_CACHE_CHECK([for long long], ac_cv_type_long_long, | ||
| 14 | [AC_TRY_LINK([long long ll = 1LL; int i = 63;], | ||
| 15 | [long long llmax = (long long) -1; | ||
| 16 | return ll << i | ll >> i | llmax / ll | llmax % ll;], | ||
| 17 | ac_cv_type_long_long=yes, | ||
| 18 | ac_cv_type_long_long=no)]) | ||
| 19 | if test $ac_cv_type_long_long = yes; then | ||
| 20 | AC_DEFINE(HAVE_LONG_LONG, 1, | ||
| 21 | [Define if you have the 'long long' type.]) | ||
| 22 | fi | ||
| 23 | ]) | ||
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 deleted file mode 100644 index a4c80890..00000000 --- a/m4/ls-mntd-fs.m4 +++ /dev/null | |||
| @@ -1,306 +0,0 @@ | |||
| 1 | #serial 21 | ||
| 2 | # How to list mounted file systems. | ||
| 3 | |||
| 4 | # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software | ||
| 5 | # Foundation, Inc. | ||
| 6 | # | ||
| 7 | # This file is free software; the Free Software Foundation | ||
| 8 | # gives unlimited permission to copy and/or distribute it, | ||
| 9 | # with or without modifications, as long as this notice is preserved. | ||
| 10 | |||
| 11 | dnl From Jim Meyering. | ||
| 12 | dnl | ||
| 13 | dnl This is not pretty. I've just taken the autoconf code and wrapped | ||
| 14 | dnl it in an AC_DEFUN and made some other fixes. | ||
| 15 | dnl | ||
| 16 | |||
| 17 | # Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf | ||
| 18 | # through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 | ||
| 19 | # or later. | ||
| 20 | AC_DEFUN([AC_FUNC_GETMNTENT], | ||
| 21 | [# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, | ||
| 22 | # -lseq on Dynix/PTX, -lgen on Unixware. | ||
| 23 | AC_SEARCH_LIBS(getmntent, [sun seq gen]) | ||
| 24 | AC_CHECK_FUNCS(getmntent) | ||
| 25 | ]) | ||
| 26 | |||
| 27 | # gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
| 28 | AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], | ||
| 29 | [ | ||
| 30 | AC_CHECK_FUNCS(listmntent getmntinfo) | ||
| 31 | AC_CHECK_HEADERS_ONCE(sys/param.h) | ||
| 32 | |||
| 33 | # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses | ||
| 34 | # NGROUPS (as the array dimension for a struct member) without a definition. | ||
| 35 | AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>]) | ||
| 36 | |||
| 37 | AC_CHECK_HEADERS(sys/mount.h, [], [], | ||
| 38 | [AC_INCLUDES_DEFAULT | ||
| 39 | [#if HAVE_SYS_PARAM_H | ||
| 40 | #include <sys/param.h> | ||
| 41 | #endif]]) | ||
| 42 | |||
| 43 | AC_CHECK_HEADERS(mntent.h sys/fs_types.h) | ||
| 44 | getfsstat_includes="\ | ||
| 45 | $ac_includes_default | ||
| 46 | #if HAVE_SYS_PARAM_H | ||
| 47 | # include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */ | ||
| 48 | #endif | ||
| 49 | #if HAVE_SYS_UCRED_H | ||
| 50 | # include <grp.h> /* needed for definition of NGROUPS */ | ||
| 51 | # include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */ | ||
| 52 | #endif | ||
| 53 | #if HAVE_SYS_MOUNT_H | ||
| 54 | # include <sys/mount.h> | ||
| 55 | #endif | ||
| 56 | #if HAVE_SYS_FS_TYPES_H | ||
| 57 | # include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */ | ||
| 58 | #endif | ||
| 59 | " | ||
| 60 | AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) | ||
| 61 | |||
| 62 | # Determine how to get the list of mounted file systems. | ||
| 63 | ac_list_mounted_fs= | ||
| 64 | |||
| 65 | # If the getmntent function is available but not in the standard library, | ||
| 66 | # make sure LIBS contains the appropriate -l option. | ||
| 67 | AC_FUNC_GETMNTENT | ||
| 68 | |||
| 69 | # This test must precede the ones for getmntent because Unicos-9 is | ||
| 70 | # reported to have the getmntent function, but its support is incompatible | ||
| 71 | # with other getmntent implementations. | ||
| 72 | |||
| 73 | # NOTE: Normally, I wouldn't use a check for system type as I've done for | ||
| 74 | # `CRAY' below since that goes against the whole autoconf philosophy. But | ||
| 75 | # I think there is too great a chance that some non-Cray system has a | ||
| 76 | # function named listmntent to risk the false positive. | ||
| 77 | |||
| 78 | if test -z "$ac_list_mounted_fs"; then | ||
| 79 | # Cray UNICOS 9 | ||
| 80 | AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) | ||
| 81 | AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent, | ||
| 82 | [fu_cv_sys_mounted_cray_listmntent=no | ||
| 83 | AC_EGREP_CPP(yes, | ||
| 84 | [#ifdef _CRAY | ||
| 85 | yes | ||
| 86 | #endif | ||
| 87 | ], [test $ac_cv_func_listmntent = yes \ | ||
| 88 | && fu_cv_sys_mounted_cray_listmntent=yes] | ||
| 89 | ) | ||
| 90 | ] | ||
| 91 | ) | ||
| 92 | AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) | ||
| 93 | if test $fu_cv_sys_mounted_cray_listmntent = yes; then | ||
| 94 | ac_list_mounted_fs=found | ||
| 95 | AC_DEFINE(MOUNTED_LISTMNTENT, 1, | ||
| 96 | [Define if there is a function named listmntent that can be used to | ||
| 97 | list all mounted file systems. (UNICOS)]) | ||
| 98 | fi | ||
| 99 | fi | ||
| 100 | |||
| 101 | if test -z "$ac_list_mounted_fs"; then | ||
| 102 | # AIX. | ||
| 103 | AC_MSG_CHECKING([for mntctl function and struct vmount]) | ||
| 104 | AC_CACHE_VAL(fu_cv_sys_mounted_vmount, | ||
| 105 | [AC_TRY_CPP([#include <fshelp.h>], | ||
| 106 | fu_cv_sys_mounted_vmount=yes, | ||
| 107 | fu_cv_sys_mounted_vmount=no)]) | ||
| 108 | AC_MSG_RESULT($fu_cv_sys_mounted_vmount) | ||
| 109 | if test $fu_cv_sys_mounted_vmount = yes; then | ||
| 110 | ac_list_mounted_fs=found | ||
| 111 | AC_DEFINE(MOUNTED_VMOUNT, 1, | ||
| 112 | [Define if there is a function named mntctl that can be used to read | ||
| 113 | the list of mounted file systems, and there is a system header file | ||
| 114 | that declares `struct vmount.' (AIX)]) | ||
| 115 | fi | ||
| 116 | fi | ||
| 117 | |||
| 118 | if test $ac_cv_func_getmntent = yes; then | ||
| 119 | |||
| 120 | # This system has the getmntent function. | ||
| 121 | # Determine whether it's the one-argument variant or the two-argument one. | ||
| 122 | |||
| 123 | if test -z "$ac_list_mounted_fs"; then | ||
| 124 | # 4.3BSD, SunOS, HP-UX, Dynix, Irix | ||
| 125 | AC_MSG_CHECKING([for one-argument getmntent function]) | ||
| 126 | AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, | ||
| 127 | [AC_TRY_COMPILE([ | ||
| 128 | /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ | ||
| 129 | #include <stdio.h> | ||
| 130 | |||
| 131 | #include <mntent.h> | ||
| 132 | #if !defined MOUNTED | ||
| 133 | # if defined _PATH_MOUNTED /* GNU libc */ | ||
| 134 | # define MOUNTED _PATH_MOUNTED | ||
| 135 | # endif | ||
| 136 | # if defined MNT_MNTTAB /* HP-UX. */ | ||
| 137 | # define MOUNTED MNT_MNTTAB | ||
| 138 | # endif | ||
| 139 | # if defined MNTTABNAME /* Dynix. */ | ||
| 140 | # define MOUNTED MNTTABNAME | ||
| 141 | # endif | ||
| 142 | #endif | ||
| 143 | ], | ||
| 144 | [ struct mntent *mnt = 0; char *table = MOUNTED; ], | ||
| 145 | fu_cv_sys_mounted_getmntent1=yes, | ||
| 146 | fu_cv_sys_mounted_getmntent1=no)]) | ||
| 147 | AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) | ||
| 148 | if test $fu_cv_sys_mounted_getmntent1 = yes; then | ||
| 149 | ac_list_mounted_fs=found | ||
| 150 | AC_DEFINE(MOUNTED_GETMNTENT1, 1, | ||
| 151 | [Define if there is a function named getmntent for reading the list | ||
| 152 | of mounted file systems, and that function takes a single argument. | ||
| 153 | (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) | ||
| 154 | fi | ||
| 155 | fi | ||
| 156 | |||
| 157 | if test -z "$ac_list_mounted_fs"; then | ||
| 158 | # SVR4 | ||
| 159 | AC_MSG_CHECKING([for two-argument getmntent function]) | ||
| 160 | AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, | ||
| 161 | [AC_EGREP_HEADER(getmntent, sys/mnttab.h, | ||
| 162 | fu_cv_sys_mounted_getmntent2=yes, | ||
| 163 | fu_cv_sys_mounted_getmntent2=no)]) | ||
| 164 | AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) | ||
| 165 | if test $fu_cv_sys_mounted_getmntent2 = yes; then | ||
| 166 | ac_list_mounted_fs=found | ||
| 167 | AC_DEFINE(MOUNTED_GETMNTENT2, 1, | ||
| 168 | [Define if there is a function named getmntent for reading the list of | ||
| 169 | mounted file systems, and that function takes two arguments. (SVR4)]) | ||
| 170 | fi | ||
| 171 | fi | ||
| 172 | |||
| 173 | fi | ||
| 174 | |||
| 175 | if test -z "$ac_list_mounted_fs"; then | ||
| 176 | # DEC Alpha running OSF/1, and Apple Darwin 1.3. | ||
| 177 | # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h | ||
| 178 | |||
| 179 | AC_MSG_CHECKING([for getfsstat function]) | ||
| 180 | AC_CACHE_VAL(fu_cv_sys_mounted_getfsstat, | ||
| 181 | [AC_TRY_LINK([ | ||
| 182 | #include <sys/types.h> | ||
| 183 | #if HAVE_STRUCT_FSSTAT_F_FSTYPENAME | ||
| 184 | # define FS_TYPE(Ent) ((Ent).f_fstypename) | ||
| 185 | #else | ||
| 186 | # define FS_TYPE(Ent) mnt_names[(Ent).f_type] | ||
| 187 | #endif | ||
| 188 | ]$getfsstat_includes | ||
| 189 | , | ||
| 190 | [struct statfs *stats; | ||
| 191 | int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); | ||
| 192 | char *t = FS_TYPE (*stats); ], | ||
| 193 | fu_cv_sys_mounted_getfsstat=yes, | ||
| 194 | fu_cv_sys_mounted_getfsstat=no)]) | ||
| 195 | AC_MSG_RESULT($fu_cv_sys_mounted_getfsstat) | ||
| 196 | if test $fu_cv_sys_mounted_getfsstat = yes; then | ||
| 197 | ac_list_mounted_fs=found | ||
| 198 | AC_DEFINE(MOUNTED_GETFSSTAT, 1, | ||
| 199 | [Define if there is a function named getfsstat for reading the | ||
| 200 | list of mounted file systems. (DEC Alpha running OSF/1)]) | ||
| 201 | fi | ||
| 202 | fi | ||
| 203 | |||
| 204 | if test -z "$ac_list_mounted_fs"; then | ||
| 205 | # SVR3 | ||
| 206 | AC_MSG_CHECKING([for FIXME existence of three headers]) | ||
| 207 | AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, | ||
| 208 | [AC_TRY_CPP([ | ||
| 209 | #include <sys/statfs.h> | ||
| 210 | #include <sys/fstyp.h> | ||
| 211 | #include <mnttab.h>], | ||
| 212 | fu_cv_sys_mounted_fread_fstyp=yes, | ||
| 213 | fu_cv_sys_mounted_fread_fstyp=no)]) | ||
| 214 | AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) | ||
| 215 | if test $fu_cv_sys_mounted_fread_fstyp = yes; then | ||
| 216 | ac_list_mounted_fs=found | ||
| 217 | AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, | ||
| 218 | [Define if (like SVR2) there is no specific function for reading the | ||
| 219 | list of mounted file systems, and your system has these header files: | ||
| 220 | <sys/fstyp.h> and <sys/statfs.h>. (SVR3)]) | ||
| 221 | fi | ||
| 222 | fi | ||
| 223 | |||
| 224 | if test -z "$ac_list_mounted_fs"; then | ||
| 225 | # 4.4BSD and DEC OSF/1. | ||
| 226 | AC_MSG_CHECKING([for getmntinfo function]) | ||
| 227 | AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, | ||
| 228 | [ | ||
| 229 | test "$ac_cv_func_getmntinfo" = yes \ | ||
| 230 | && fu_cv_sys_mounted_getmntinfo=yes \ | ||
| 231 | || fu_cv_sys_mounted_getmntinfo=no | ||
| 232 | ]) | ||
| 233 | AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) | ||
| 234 | if test $fu_cv_sys_mounted_getmntinfo = yes; then | ||
| 235 | ac_list_mounted_fs=found | ||
| 236 | AC_DEFINE(MOUNTED_GETMNTINFO, 1, | ||
| 237 | [Define if there is a function named getmntinfo for reading the | ||
| 238 | list of mounted file systems. (4.4BSD, Darwin)]) | ||
| 239 | fi | ||
| 240 | fi | ||
| 241 | |||
| 242 | if test -z "$ac_list_mounted_fs"; then | ||
| 243 | # Ultrix | ||
| 244 | AC_MSG_CHECKING([for getmnt function]) | ||
| 245 | AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, | ||
| 246 | [AC_TRY_CPP([ | ||
| 247 | #include <sys/fs_types.h> | ||
| 248 | #include <sys/mount.h>], | ||
| 249 | fu_cv_sys_mounted_getmnt=yes, | ||
| 250 | fu_cv_sys_mounted_getmnt=no)]) | ||
| 251 | AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) | ||
| 252 | if test $fu_cv_sys_mounted_getmnt = yes; then | ||
| 253 | ac_list_mounted_fs=found | ||
| 254 | AC_DEFINE(MOUNTED_GETMNT, 1, | ||
| 255 | [Define if there is a function named getmnt for reading the list of | ||
| 256 | mounted file systems. (Ultrix)]) | ||
| 257 | fi | ||
| 258 | fi | ||
| 259 | |||
| 260 | if test -z "$ac_list_mounted_fs"; then | ||
| 261 | # BeOS | ||
| 262 | AC_CHECK_FUNCS(next_dev fs_stat_dev) | ||
| 263 | AC_CHECK_HEADERS(fs_info.h) | ||
| 264 | AC_MSG_CHECKING([for BEOS mounted file system support functions]) | ||
| 265 | if test $ac_cv_header_fs_info_h = yes \ | ||
| 266 | && test $ac_cv_func_next_dev = yes \ | ||
| 267 | && test $ac_cv_func_fs_stat_dev = yes; then | ||
| 268 | fu_result=yes | ||
| 269 | else | ||
| 270 | fu_result=no | ||
| 271 | fi | ||
| 272 | AC_MSG_RESULT($fu_result) | ||
| 273 | if test $fu_result = yes; then | ||
| 274 | ac_list_mounted_fs=found | ||
| 275 | AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, | ||
| 276 | [Define if there are functions named next_dev and fs_stat_dev for | ||
| 277 | reading the list of mounted file systems. (BeOS)]) | ||
| 278 | fi | ||
| 279 | fi | ||
| 280 | |||
| 281 | if test -z "$ac_list_mounted_fs"; then | ||
| 282 | # SVR2 | ||
| 283 | AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) | ||
| 284 | AC_CACHE_VAL(fu_cv_sys_mounted_fread, | ||
| 285 | [AC_TRY_CPP([#include <mnttab.h>], | ||
| 286 | fu_cv_sys_mounted_fread=yes, | ||
| 287 | fu_cv_sys_mounted_fread=no)]) | ||
| 288 | AC_MSG_RESULT($fu_cv_sys_mounted_fread) | ||
| 289 | if test $fu_cv_sys_mounted_fread = yes; then | ||
| 290 | ac_list_mounted_fs=found | ||
| 291 | AC_DEFINE(MOUNTED_FREAD, 1, | ||
| 292 | [Define if there is no specific function for reading the list of | ||
| 293 | mounted file systems. fread will be used to read /etc/mnttab. | ||
| 294 | (SVR2) ]) | ||
| 295 | fi | ||
| 296 | fi | ||
| 297 | |||
| 298 | if test -z "$ac_list_mounted_fs"; then | ||
| 299 | AC_MSG_ERROR([could not determine how to read list of mounted file systems]) | ||
| 300 | # FIXME -- no need to abort building the whole package | ||
| 301 | # Can't build mountlist.c or anything that needs its functions | ||
| 302 | fi | ||
| 303 | |||
| 304 | AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) | ||
| 305 | |||
| 306 | ]) | ||
diff --git a/m4/mountlist.m4 b/m4/mountlist.m4 deleted file mode 100644 index b2a2e12f..00000000 --- a/m4/mountlist.m4 +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | #serial 8 | ||
| 2 | dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_MOUNTLIST], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([mountlist.c, mountlist.h]) | ||
| 10 | |||
| 11 | gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], | ||
| 12 | [gl_cv_list_mounted_fs=no]) | ||
| 13 | if test $gl_cv_list_mounted_fs = yes; then | ||
| 14 | AC_LIBOBJ(mountlist) | ||
| 15 | gl_PREREQ_MOUNTLIST_EXTRA | ||
| 16 | fi | ||
| 17 | ]) | ||
| 18 | |||
| 19 | # Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS. | ||
| 20 | AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], | ||
| 21 | [ | ||
| 22 | dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. | ||
| 23 | AC_CHECK_HEADERS(sys/mntent.h) | ||
| 24 | gl_FSTYPENAME | ||
| 25 | ]) | ||
diff --git a/m4/nls.m4 b/m4/nls.m4 deleted file mode 100644 index 2082c3b2..00000000 --- a/m4/nls.m4 +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | # nls.m4 serial 2 (gettext-0.14.3) | ||
| 2 | dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | dnl | ||
| 7 | dnl This file can can be used in projects which are not available under | ||
| 8 | dnl the GNU General Public License or the GNU Library General Public | ||
| 9 | dnl License but which still want to provide support for the GNU gettext | ||
| 10 | dnl functionality. | ||
| 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
| 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
| 13 | dnl gettext package package is covered by the GNU General Public License. | ||
| 14 | dnl They are *not* in the public domain. | ||
| 15 | |||
| 16 | dnl Authors: | ||
| 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
| 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | ||
| 19 | |||
| 20 | AC_PREREQ(2.50) | ||
| 21 | |||
| 22 | AC_DEFUN([AM_NLS], | ||
| 23 | [ | ||
| 24 | AC_MSG_CHECKING([whether NLS is requested]) | ||
| 25 | dnl Default is enabled NLS | ||
| 26 | AC_ARG_ENABLE(nls, | ||
| 27 | [ --disable-nls do not use Native Language Support], | ||
| 28 | USE_NLS=$enableval, USE_NLS=yes) | ||
| 29 | AC_MSG_RESULT($USE_NLS) | ||
| 30 | AC_SUBST(USE_NLS) | ||
| 31 | ]) | ||
| 32 | |||
| 33 | AC_DEFUN([AM_MKINSTALLDIRS], | ||
| 34 | [ | ||
| 35 | dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. | ||
| 36 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) | ||
| 37 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly | ||
| 38 | dnl find the mkinstalldirs script in another subdir but $(top_srcdir). | ||
| 39 | dnl Try to locate it. | ||
| 40 | MKINSTALLDIRS= | ||
| 41 | if test -n "$ac_aux_dir"; then | ||
| 42 | case "$ac_aux_dir" in | ||
| 43 | /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; | ||
| 44 | *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; | ||
| 45 | esac | ||
| 46 | fi | ||
| 47 | if test -z "$MKINSTALLDIRS"; then | ||
| 48 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | ||
| 49 | fi | ||
| 50 | AC_SUBST(MKINSTALLDIRS) | ||
| 51 | ]) | ||
diff --git a/m4/np_coreutils.m4 b/m4/np_coreutils.m4 deleted file mode 100644 index 77cb9f69..00000000 --- a/m4/np_coreutils.m4 +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | dnl These are for the libs and macros from coreutils | ||
| 2 | dnl Currently utilising v5.2.1 | ||
| 3 | |||
| 4 | dnl We use jm_ for non Autoconf macros. | ||
| 5 | m4_pattern_forbid([^np_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 6 | m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 7 | m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 8 | |||
| 9 | dnl These are all m4 things that need to be called | ||
| 10 | dnl Usually in coreutils' prereq.m4, but this is a subset that we need | ||
| 11 | AC_DEFUN([np_COREUTILS], | ||
| 12 | [ | ||
| 13 | AC_REQUIRE([AM_STDBOOL_H]) | ||
| 14 | AC_REQUIRE([gl_BASENAME]) | ||
| 15 | AC_REQUIRE([gl_C_STRTOLD]) | ||
| 16 | AC_REQUIRE([gl_EXITFAIL]) | ||
| 17 | AC_REQUIRE([gl_FCNTL_SAFER]) | ||
| 18 | AC_REQUIRE([gl_FSUSAGE]) | ||
| 19 | AC_REQUIRE([gl_FUNC_ALLOCA]) | ||
| 20 | AC_REQUIRE([gl_GETOPT]) | ||
| 21 | AC_REQUIRE([gl_MOUNTLIST]) | ||
| 22 | AC_REQUIRE([gl_REGEX]) | ||
| 23 | AC_REQUIRE([gl_UNISTD_SAFER]) | ||
| 24 | AC_REQUIRE([gl_XALLOC]) | ||
| 25 | AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO]) | ||
| 26 | |||
| 27 | dnl This is in jm-macros.m4, which calls prereq.m4, and then calls this afterwards | ||
| 28 | AC_REQUIRE([gl_AFS]) | ||
| 29 | ]) | ||
diff --git a/m4/np_curl.m4 b/m4/np_curl.m4 deleted file mode 100644 index 64c3db54..00000000 --- a/m4/np_curl.m4 +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | dnl These are for the libs and macros from curl | ||
| 2 | dnl Currently utilising v7.12.3 | ||
| 3 | |||
| 4 | dnl We use jm_ for non Autoconf macros. | ||
| 5 | dnl m4_pattern_forbid([^np_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 6 | dnl m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 7 | dnl m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl | ||
| 8 | |||
| 9 | dnl These are all m4 things that need to be called | ||
| 10 | dnl Usually in coreutils' prereq.m4, but this is a subset that we need | ||
| 11 | AC_DEFUN([np_CURL], | ||
| 12 | [ | ||
| 13 | AC_REQUIRE([TYPE_SOCKLEN_T]) | ||
| 14 | ]) | ||
| 15 | |||
| 16 | dnl Check for socklen_t: historically on BSD it is an int, and in | ||
| 17 | dnl POSIX 1g it is a type of its own, but some platforms use different | ||
| 18 | dnl types for the argument to getsockopt, getpeername, etc. So we | ||
| 19 | dnl have to test to find something that will work. | ||
| 20 | AC_DEFUN([TYPE_SOCKLEN_T], | ||
| 21 | [ | ||
| 22 | AC_CHECK_TYPE([socklen_t], ,[ | ||
| 23 | AC_MSG_CHECKING([for socklen_t equivalent]) | ||
| 24 | AC_CACHE_VAL([curl_cv_socklen_t_equiv], | ||
| 25 | [ | ||
| 26 | # Systems have either "struct sockaddr *" or | ||
| 27 | # "void *" as the second argument to getpeername | ||
| 28 | curl_cv_socklen_t_equiv= | ||
| 29 | for arg2 in "struct sockaddr" void; do | ||
| 30 | for t in int size_t unsigned long "unsigned long"; do | ||
| 31 | AC_TRY_COMPILE([ | ||
| 32 | #ifdef HAVE_SYS_TYPES_H | ||
| 33 | #include <sys/types.h> | ||
| 34 | #endif | ||
| 35 | #ifdef HAVE_SYS_SOCKET_H | ||
| 36 | #include <sys/socket.h> | ||
| 37 | #endif | ||
| 38 | |||
| 39 | int getpeername (int, $arg2 *, $t *); | ||
| 40 | ],[ | ||
| 41 | $t len; | ||
| 42 | getpeername(0,0,&len); | ||
| 43 | ],[ | ||
| 44 | curl_cv_socklen_t_equiv="$t" | ||
| 45 | break | ||
| 46 | ]) | ||
| 47 | done | ||
| 48 | done | ||
| 49 | |||
| 50 | if test "x$curl_cv_socklen_t_equiv" = x; then | ||
| 51 | AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) | ||
| 52 | fi | ||
| 53 | ]) | ||
| 54 | AC_MSG_RESULT($curl_cv_socklen_t_equiv) | ||
| 55 | AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, | ||
| 56 | [type to use in place of socklen_t if not defined])], | ||
| 57 | [#include <sys/types.h> | ||
| 58 | #include <sys/socket.h>]) | ||
| 59 | ]) | ||
| 60 | |||
diff --git a/m4/onceonly_2_57.m4 b/m4/onceonly_2_57.m4 deleted file mode 100644 index 14d3c0b2..00000000 --- a/m4/onceonly_2_57.m4 +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | # onceonly_2_57.m4 serial 3 | ||
| 2 | dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software, distributed under the terms of the GNU | ||
| 4 | dnl General Public License. As a special exception to the GNU General | ||
| 5 | dnl Public License, this file may be distributed as part of a program | ||
| 6 | dnl that contains a configuration script generated by Autoconf, under | ||
| 7 | dnl the same distribution terms as the rest of that program. | ||
| 8 | |||
| 9 | dnl This file defines some "once only" variants of standard autoconf macros. | ||
| 10 | dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS | ||
| 11 | dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS | ||
| 12 | dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS | ||
| 13 | dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC | ||
| 14 | dnl The advantage is that the check for each of the headers/functions/decls | ||
| 15 | dnl will be put only once into the 'configure' file. It keeps the size of | ||
| 16 | dnl the 'configure' file down, and avoids redundant output when 'configure' | ||
| 17 | dnl is run. | ||
| 18 | dnl The drawback is that the checks cannot be conditionalized. If you write | ||
| 19 | dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi | ||
| 20 | dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to | ||
| 21 | dnl empty, and the check will be inserted before the body of the AC_DEFUNed | ||
| 22 | dnl function. | ||
| 23 | |||
| 24 | dnl This is like onceonly.m4, except that it uses diversions to named sections | ||
| 25 | dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once, | ||
| 26 | dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The | ||
| 27 | dnl size reduction is ca. 9%. | ||
| 28 | |||
| 29 | dnl Autoconf version 2.57 or newer is recommended. | ||
| 30 | AC_PREREQ(2.57) | ||
| 31 | |||
| 32 | # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of | ||
| 33 | # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). | ||
| 34 | AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ | ||
| 35 | : | ||
| 36 | AC_FOREACH([gl_HEADER_NAME], [$1], [ | ||
| 37 | AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, | ||
| 38 | [./-], [___])), [ | ||
| 39 | m4_divert_text([INIT_PREPARE], | ||
| 40 | [gl_header_list="$gl_header_list gl_HEADER_NAME"]) | ||
| 41 | gl_HEADERS_EXPANSION | ||
| 42 | AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), | ||
| 43 | [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) | ||
| 44 | ]) | ||
| 45 | AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, | ||
| 46 | [./-], [___]))) | ||
| 47 | ]) | ||
| 48 | ]) | ||
| 49 | m4_define([gl_HEADERS_EXPANSION], [ | ||
| 50 | m4_divert_text([DEFAULTS], [gl_header_list=]) | ||
| 51 | AC_CHECK_HEADERS([$gl_header_list]) | ||
| 52 | m4_define([gl_HEADERS_EXPANSION], []) | ||
| 53 | ]) | ||
| 54 | |||
| 55 | # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of | ||
| 56 | # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). | ||
| 57 | AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ | ||
| 58 | : | ||
| 59 | AC_FOREACH([gl_FUNC_NAME], [$1], [ | ||
| 60 | AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ | ||
| 61 | m4_divert_text([INIT_PREPARE], | ||
| 62 | [gl_func_list="$gl_func_list gl_FUNC_NAME"]) | ||
| 63 | gl_FUNCS_EXPANSION | ||
| 64 | AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), | ||
| 65 | [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) | ||
| 66 | ]) | ||
| 67 | AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) | ||
| 68 | ]) | ||
| 69 | ]) | ||
| 70 | m4_define([gl_FUNCS_EXPANSION], [ | ||
| 71 | m4_divert_text([DEFAULTS], [gl_func_list=]) | ||
| 72 | AC_CHECK_FUNCS([$gl_func_list]) | ||
| 73 | m4_define([gl_FUNCS_EXPANSION], []) | ||
| 74 | ]) | ||
| 75 | |||
| 76 | # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of | ||
| 77 | # AC_CHECK_DECLS(DECL1, DECL2, ...). | ||
| 78 | AC_DEFUN([AC_CHECK_DECLS_ONCE], [ | ||
| 79 | : | ||
| 80 | AC_FOREACH([gl_DECL_NAME], [$1], [ | ||
| 81 | AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ | ||
| 82 | AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) | ||
| 83 | ]) | ||
| 84 | AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) | ||
| 85 | ]) | ||
| 86 | ]) | ||
diff --git a/m4/po.m4 b/m4/po.m4 deleted file mode 100644 index f2795eea..00000000 --- a/m4/po.m4 +++ /dev/null | |||
| @@ -1,429 +0,0 @@ | |||
| 1 | # po.m4 serial 7 (gettext-0.14.3) | ||
| 2 | dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | dnl | ||
| 7 | dnl This file can can be used in projects which are not available under | ||
| 8 | dnl the GNU General Public License or the GNU Library General Public | ||
| 9 | dnl License but which still want to provide support for the GNU gettext | ||
| 10 | dnl functionality. | ||
| 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
| 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
| 13 | dnl gettext package package is covered by the GNU General Public License. | ||
| 14 | dnl They are *not* in the public domain. | ||
| 15 | |||
| 16 | dnl Authors: | ||
| 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
| 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | ||
| 19 | |||
| 20 | AC_PREREQ(2.50) | ||
| 21 | |||
| 22 | dnl Checks for all prerequisites of the po subdirectory. | ||
| 23 | AC_DEFUN([AM_PO_SUBDIRS], | ||
| 24 | [ | ||
| 25 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | ||
| 26 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
| 27 | AC_REQUIRE([AM_MKINSTALLDIRS])dnl | ||
| 28 | AC_REQUIRE([AM_NLS])dnl | ||
| 29 | |||
| 30 | dnl Perform the following tests also if --disable-nls has been given, | ||
| 31 | dnl because they are needed for "make dist" to work. | ||
| 32 | |||
| 33 | dnl Search for GNU msgfmt in the PATH. | ||
| 34 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. | ||
| 35 | dnl The second test excludes FreeBSD msgfmt. | ||
| 36 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | ||
| 37 | [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | ||
| 38 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
| 39 | :) | ||
| 40 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | ||
| 41 | |||
| 42 | dnl Search for GNU xgettext 0.12 or newer in the PATH. | ||
| 43 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions. | ||
| 44 | dnl The second test excludes FreeBSD xgettext. | ||
| 45 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | ||
| 46 | [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | ||
| 47 | (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
| 48 | :) | ||
| 49 | dnl Remove leftover from FreeBSD xgettext call. | ||
| 50 | rm -f messages.po | ||
| 51 | |||
| 52 | dnl Search for GNU msgmerge 0.11 or newer in the PATH. | ||
| 53 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, | ||
| 54 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) | ||
| 55 | |||
| 56 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | ||
| 57 | dnl Test whether we really found GNU msgfmt. | ||
| 58 | if test "$GMSGFMT" != ":"; then | ||
| 59 | dnl If it is no GNU msgfmt we define it as : so that the | ||
| 60 | dnl Makefiles still can work. | ||
| 61 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && | ||
| 62 | (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | ||
| 63 | : ; | ||
| 64 | else | ||
| 65 | GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` | ||
| 66 | AC_MSG_RESULT( | ||
| 67 | [found $GMSGFMT program is not GNU msgfmt; ignore it]) | ||
| 68 | GMSGFMT=":" | ||
| 69 | fi | ||
| 70 | fi | ||
| 71 | |||
| 72 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | ||
| 73 | dnl Test whether we really found GNU xgettext. | ||
| 74 | if test "$XGETTEXT" != ":"; then | ||
| 75 | dnl If it is no GNU xgettext we define it as : so that the | ||
| 76 | dnl Makefiles still can work. | ||
| 77 | if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && | ||
| 78 | (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | ||
| 79 | : ; | ||
| 80 | else | ||
| 81 | AC_MSG_RESULT( | ||
| 82 | [found xgettext program is not GNU xgettext; ignore it]) | ||
| 83 | XGETTEXT=":" | ||
| 84 | fi | ||
| 85 | dnl Remove leftover from FreeBSD xgettext call. | ||
| 86 | rm -f messages.po | ||
| 87 | fi | ||
| 88 | |||
| 89 | AC_OUTPUT_COMMANDS([ | ||
| 90 | for ac_file in $CONFIG_FILES; do | ||
| 91 | # Support "outfile[:infile[:infile...]]" | ||
| 92 | case "$ac_file" in | ||
| 93 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | ||
| 94 | esac | ||
| 95 | # PO directories have a Makefile.in generated from Makefile.in.in. | ||
| 96 | case "$ac_file" in */Makefile.in) | ||
| 97 | # Adjust a relative srcdir. | ||
| 98 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
| 99 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ||
| 100 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
| 101 | # In autoconf-2.13 it is called $ac_given_srcdir. | ||
| 102 | # In autoconf-2.50 it is called $srcdir. | ||
| 103 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
| 104 | case "$ac_given_srcdir" in | ||
| 105 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
| 106 | /*) top_srcdir="$ac_given_srcdir" ;; | ||
| 107 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
| 108 | esac | ||
| 109 | # Treat a directory as a PO directory if and only if it has a | ||
| 110 | # POTFILES.in file. This allows packages to have multiple PO | ||
| 111 | # directories under different names or in different locations. | ||
| 112 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | ||
| 113 | rm -f "$ac_dir/POTFILES" | ||
| 114 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | ||
| 115 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | ||
| 116 | POMAKEFILEDEPS="POTFILES.in" | ||
| 117 | # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend | ||
| 118 | # on $ac_dir but don't depend on user-specified configuration | ||
| 119 | # parameters. | ||
| 120 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
| 121 | # The LINGUAS file contains the set of available languages. | ||
| 122 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | ||
| 123 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
| 124 | fi | ||
| 125 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
| 126 | # Hide the ALL_LINGUAS assigment from automake. | ||
| 127 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
| 128 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | ||
| 129 | else | ||
| 130 | # The set of available languages was given in configure.in. | ||
| 131 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' | ||
| 132 | fi | ||
| 133 | # Compute POFILES | ||
| 134 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | ||
| 135 | # Compute UPDATEPOFILES | ||
| 136 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) | ||
| 137 | # Compute DUMMYPOFILES | ||
| 138 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) | ||
| 139 | # Compute GMOFILES | ||
| 140 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) | ||
| 141 | case "$ac_given_srcdir" in | ||
| 142 | .) srcdirpre= ;; | ||
| 143 | *) srcdirpre='$(srcdir)/' ;; | ||
| 144 | esac | ||
| 145 | POFILES= | ||
| 146 | UPDATEPOFILES= | ||
| 147 | DUMMYPOFILES= | ||
| 148 | GMOFILES= | ||
| 149 | for lang in $ALL_LINGUAS; do | ||
| 150 | POFILES="$POFILES $srcdirpre$lang.po" | ||
| 151 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
| 152 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
| 153 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
| 154 | done | ||
| 155 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
| 156 | # environment variable. | ||
| 157 | INST_LINGUAS= | ||
| 158 | if test -n "$ALL_LINGUAS"; then | ||
| 159 | for presentlang in $ALL_LINGUAS; do | ||
| 160 | useit=no | ||
| 161 | if test "%UNSET%" != "$LINGUAS"; then | ||
| 162 | desiredlanguages="$LINGUAS" | ||
| 163 | else | ||
| 164 | desiredlanguages="$ALL_LINGUAS" | ||
| 165 | fi | ||
| 166 | for desiredlang in $desiredlanguages; do | ||
| 167 | # Use the presentlang catalog if desiredlang is | ||
| 168 | # a. equal to presentlang, or | ||
| 169 | # b. a variant of presentlang (because in this case, | ||
| 170 | # presentlang can be used as a fallback for messages | ||
| 171 | # which are not translated in the desiredlang catalog). | ||
| 172 | case "$desiredlang" in | ||
| 173 | "$presentlang"*) useit=yes;; | ||
| 174 | esac | ||
| 175 | done | ||
| 176 | if test $useit = yes; then | ||
| 177 | INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
| 178 | fi | ||
| 179 | done | ||
| 180 | fi | ||
| 181 | CATALOGS= | ||
| 182 | if test -n "$INST_LINGUAS"; then | ||
| 183 | for lang in $INST_LINGUAS; do | ||
| 184 | CATALOGS="$CATALOGS $lang.gmo" | ||
| 185 | done | ||
| 186 | fi | ||
| 187 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | ||
| 188 | sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | ||
| 189 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | ||
| 190 | if test -f "$f"; then | ||
| 191 | case "$f" in | ||
| 192 | *.orig | *.bak | *~) ;; | ||
| 193 | *) cat "$f" >> "$ac_dir/Makefile" ;; | ||
| 194 | esac | ||
| 195 | fi | ||
| 196 | done | ||
| 197 | fi | ||
| 198 | ;; | ||
| 199 | esac | ||
| 200 | done], | ||
| 201 | [# Capture the value of obsolete ALL_LINGUAS because we need it to compute | ||
| 202 | # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it | ||
| 203 | # from automake. | ||
| 204 | eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' | ||
| 205 | # Capture the value of LINGUAS because we need it to compute CATALOGS. | ||
| 206 | LINGUAS="${LINGUAS-%UNSET%}" | ||
| 207 | ]) | ||
| 208 | ]) | ||
| 209 | |||
| 210 | dnl Postprocesses a Makefile in a directory containing PO files. | ||
| 211 | AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], | ||
| 212 | [ | ||
| 213 | # When this code is run, in config.status, two variables have already been | ||
| 214 | # set: | ||
| 215 | # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, | ||
| 216 | # - LINGUAS is the value of the environment variable LINGUAS at configure | ||
| 217 | # time. | ||
| 218 | |||
| 219 | changequote(,)dnl | ||
| 220 | # Adjust a relative srcdir. | ||
| 221 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
| 222 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ||
| 223 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
| 224 | # In autoconf-2.13 it is called $ac_given_srcdir. | ||
| 225 | # In autoconf-2.50 it is called $srcdir. | ||
| 226 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
| 227 | case "$ac_given_srcdir" in | ||
| 228 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
| 229 | /*) top_srcdir="$ac_given_srcdir" ;; | ||
| 230 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
| 231 | esac | ||
| 232 | |||
| 233 | # Find a way to echo strings without interpreting backslash. | ||
| 234 | if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then | ||
| 235 | gt_echo='echo' | ||
| 236 | else | ||
| 237 | if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then | ||
| 238 | gt_echo='printf %s\n' | ||
| 239 | else | ||
| 240 | echo_func () { | ||
| 241 | cat <<EOT | ||
| 242 | $* | ||
| 243 | EOT | ||
| 244 | } | ||
| 245 | gt_echo='echo_func' | ||
| 246 | fi | ||
| 247 | fi | ||
| 248 | |||
| 249 | # A sed script that extracts the value of VARIABLE from a Makefile. | ||
| 250 | sed_x_variable=' | ||
| 251 | # Test if the hold space is empty. | ||
| 252 | x | ||
| 253 | s/P/P/ | ||
| 254 | x | ||
| 255 | ta | ||
| 256 | # Yes it was empty. Look if we have the expected variable definition. | ||
| 257 | /^[ ]*VARIABLE[ ]*=/{ | ||
| 258 | # Seen the first line of the variable definition. | ||
| 259 | s/^[ ]*VARIABLE[ ]*=// | ||
| 260 | ba | ||
| 261 | } | ||
| 262 | bd | ||
| 263 | :a | ||
| 264 | # Here we are processing a line from the variable definition. | ||
| 265 | # Remove comment, more precisely replace it with a space. | ||
| 266 | s/#.*$/ / | ||
| 267 | # See if the line ends in a backslash. | ||
| 268 | tb | ||
| 269 | :b | ||
| 270 | s/\\$// | ||
| 271 | # Print the line, without the trailing backslash. | ||
| 272 | p | ||
| 273 | tc | ||
| 274 | # There was no trailing backslash. The end of the variable definition is | ||
| 275 | # reached. Clear the hold space. | ||
| 276 | s/^.*$// | ||
| 277 | x | ||
| 278 | bd | ||
| 279 | :c | ||
| 280 | # A trailing backslash means that the variable definition continues in the | ||
| 281 | # next line. Put a nonempty string into the hold space to indicate this. | ||
| 282 | s/^.*$/P/ | ||
| 283 | x | ||
| 284 | :d | ||
| 285 | ' | ||
| 286 | changequote([,])dnl | ||
| 287 | |||
| 288 | # Set POTFILES to the value of the Makefile variable POTFILES. | ||
| 289 | sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`" | ||
| 290 | POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` | ||
| 291 | # Compute POTFILES_DEPS as | ||
| 292 | # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) | ||
| 293 | POTFILES_DEPS= | ||
| 294 | for file in $POTFILES; do | ||
| 295 | POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" | ||
| 296 | done | ||
| 297 | POMAKEFILEDEPS="" | ||
| 298 | |||
| 299 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | ||
| 300 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
| 301 | fi | ||
| 302 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
| 303 | # The LINGUAS file contains the set of available languages. | ||
| 304 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
| 305 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | ||
| 306 | else | ||
| 307 | # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. | ||
| 308 | sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`" | ||
| 309 | ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` | ||
| 310 | fi | ||
| 311 | # Hide the ALL_LINGUAS assigment from automake. | ||
| 312 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
| 313 | # Compute POFILES | ||
| 314 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | ||
| 315 | # Compute UPDATEPOFILES | ||
| 316 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) | ||
| 317 | # Compute DUMMYPOFILES | ||
| 318 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) | ||
| 319 | # Compute GMOFILES | ||
| 320 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) | ||
| 321 | # Compute PROPERTIESFILES | ||
| 322 | # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) | ||
| 323 | # Compute CLASSFILES | ||
| 324 | # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) | ||
| 325 | # Compute QMFILES | ||
| 326 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) | ||
| 327 | # Compute MSGFILES | ||
| 328 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) | ||
| 329 | # Compute RESOURCESDLLFILES | ||
| 330 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) | ||
| 331 | case "$ac_given_srcdir" in | ||
| 332 | .) srcdirpre= ;; | ||
| 333 | *) srcdirpre='$(srcdir)/' ;; | ||
| 334 | esac | ||
| 335 | POFILES= | ||
| 336 | UPDATEPOFILES= | ||
| 337 | DUMMYPOFILES= | ||
| 338 | GMOFILES= | ||
| 339 | PROPERTIESFILES= | ||
| 340 | CLASSFILES= | ||
| 341 | QMFILES= | ||
| 342 | MSGFILES= | ||
| 343 | RESOURCESDLLFILES= | ||
| 344 | for lang in $ALL_LINGUAS; do | ||
| 345 | POFILES="$POFILES $srcdirpre$lang.po" | ||
| 346 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
| 347 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
| 348 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
| 349 | PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" | ||
| 350 | CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" | ||
| 351 | QMFILES="$QMFILES $srcdirpre$lang.qm" | ||
| 352 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
| 353 | MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" | ||
| 354 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
| 355 | RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" | ||
| 356 | done | ||
| 357 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
| 358 | # environment variable. | ||
| 359 | INST_LINGUAS= | ||
| 360 | if test -n "$ALL_LINGUAS"; then | ||
| 361 | for presentlang in $ALL_LINGUAS; do | ||
| 362 | useit=no | ||
| 363 | if test "%UNSET%" != "$LINGUAS"; then | ||
| 364 | desiredlanguages="$LINGUAS" | ||
| 365 | else | ||
| 366 | desiredlanguages="$ALL_LINGUAS" | ||
| 367 | fi | ||
| 368 | for desiredlang in $desiredlanguages; do | ||
| 369 | # Use the presentlang catalog if desiredlang is | ||
| 370 | # a. equal to presentlang, or | ||
| 371 | # b. a variant of presentlang (because in this case, | ||
| 372 | # presentlang can be used as a fallback for messages | ||
| 373 | # which are not translated in the desiredlang catalog). | ||
| 374 | case "$desiredlang" in | ||
| 375 | "$presentlang"*) useit=yes;; | ||
| 376 | esac | ||
| 377 | done | ||
| 378 | if test $useit = yes; then | ||
| 379 | INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
| 380 | fi | ||
| 381 | done | ||
| 382 | fi | ||
| 383 | CATALOGS= | ||
| 384 | JAVACATALOGS= | ||
| 385 | QTCATALOGS= | ||
| 386 | TCLCATALOGS= | ||
| 387 | CSHARPCATALOGS= | ||
| 388 | if test -n "$INST_LINGUAS"; then | ||
| 389 | for lang in $INST_LINGUAS; do | ||
| 390 | CATALOGS="$CATALOGS $lang.gmo" | ||
| 391 | JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" | ||
| 392 | QTCATALOGS="$QTCATALOGS $lang.qm" | ||
| 393 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
| 394 | TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" | ||
| 395 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
| 396 | CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" | ||
| 397 | done | ||
| 398 | fi | ||
| 399 | |||
| 400 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" | ||
| 401 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then | ||
| 402 | # Add dependencies that cannot be formulated as a simple suffix rule. | ||
| 403 | for lang in $ALL_LINGUAS; do | ||
| 404 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
| 405 | cat >> "$ac_file.tmp" <<EOF | ||
| 406 | $frobbedlang.msg: $lang.po | ||
| 407 | @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ | ||
| 408 | \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ||
| 409 | EOF | ||
| 410 | done | ||
| 411 | fi | ||
| 412 | if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then | ||
| 413 | # Add dependencies that cannot be formulated as a simple suffix rule. | ||
| 414 | for lang in $ALL_LINGUAS; do | ||
| 415 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
| 416 | cat >> "$ac_file.tmp" <<EOF | ||
| 417 | $frobbedlang/\$(DOMAIN).resources.dll: $lang.po | ||
| 418 | @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ | ||
| 419 | \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ||
| 420 | EOF | ||
| 421 | done | ||
| 422 | fi | ||
| 423 | if test -n "$POMAKEFILEDEPS"; then | ||
| 424 | cat >> "$ac_file.tmp" <<EOF | ||
| 425 | Makefile: $POMAKEFILEDEPS | ||
| 426 | EOF | ||
| 427 | fi | ||
| 428 | mv "$ac_file.tmp" "$ac_file" | ||
| 429 | ]) | ||
diff --git a/m4/progtest.m4 b/m4/progtest.m4 deleted file mode 100644 index a56365cd..00000000 --- a/m4/progtest.m4 +++ /dev/null | |||
| @@ -1,92 +0,0 @@ | |||
| 1 | # progtest.m4 serial 4 (gettext-0.14.2) | ||
| 2 | dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | dnl | ||
| 7 | dnl This file can can be used in projects which are not available under | ||
| 8 | dnl the GNU General Public License or the GNU Library General Public | ||
| 9 | dnl License but which still want to provide support for the GNU gettext | ||
| 10 | dnl functionality. | ||
| 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
| 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
| 13 | dnl gettext package package is covered by the GNU General Public License. | ||
| 14 | dnl They are *not* in the public domain. | ||
| 15 | |||
| 16 | dnl Authors: | ||
| 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | ||
| 18 | |||
| 19 | AC_PREREQ(2.50) | ||
| 20 | |||
| 21 | # Search path for a program which passes the given test. | ||
| 22 | |||
| 23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | ||
| 24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | ||
| 25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], | ||
| 26 | [ | ||
| 27 | # Prepare PATH_SEPARATOR. | ||
| 28 | # The user is always right. | ||
| 29 | if test "${PATH_SEPARATOR+set}" != set; then | ||
| 30 | echo "#! /bin/sh" >conf$$.sh | ||
| 31 | echo "exit 0" >>conf$$.sh | ||
| 32 | chmod +x conf$$.sh | ||
| 33 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | ||
| 34 | PATH_SEPARATOR=';' | ||
| 35 | else | ||
| 36 | PATH_SEPARATOR=: | ||
| 37 | fi | ||
| 38 | rm -f conf$$.sh | ||
| 39 | fi | ||
| 40 | |||
| 41 | # Find out how to test for executable files. Don't use a zero-byte file, | ||
| 42 | # as systems may use methods other than mode bits to determine executability. | ||
| 43 | cat >conf$$.file <<_ASEOF | ||
| 44 | #! /bin/sh | ||
| 45 | exit 0 | ||
| 46 | _ASEOF | ||
| 47 | chmod +x conf$$.file | ||
| 48 | if test -x conf$$.file >/dev/null 2>&1; then | ||
| 49 | ac_executable_p="test -x" | ||
| 50 | else | ||
| 51 | ac_executable_p="test -f" | ||
| 52 | fi | ||
| 53 | rm -f conf$$.file | ||
| 54 | |||
| 55 | # Extract the first word of "$2", so it can be a program name with args. | ||
| 56 | set dummy $2; ac_word=[$]2 | ||
| 57 | AC_MSG_CHECKING([for $ac_word]) | ||
| 58 | AC_CACHE_VAL(ac_cv_path_$1, | ||
| 59 | [case "[$]$1" in | ||
| 60 | [[\\/]]* | ?:[[\\/]]*) | ||
| 61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | ||
| 62 | ;; | ||
| 63 | *) | ||
| 64 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | ||
| 65 | for ac_dir in ifelse([$5], , $PATH, [$5]); do | ||
| 66 | IFS="$ac_save_IFS" | ||
| 67 | test -z "$ac_dir" && ac_dir=. | ||
| 68 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 69 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | ||
| 70 | echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD | ||
| 71 | if [$3]; then | ||
| 72 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" | ||
| 73 | break 2 | ||
| 74 | fi | ||
| 75 | fi | ||
| 76 | done | ||
| 77 | done | ||
| 78 | IFS="$ac_save_IFS" | ||
| 79 | dnl If no 4th arg is given, leave the cache variable unset, | ||
| 80 | dnl so AC_PATH_PROGS will keep looking. | ||
| 81 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | ||
| 82 | ])dnl | ||
| 83 | ;; | ||
| 84 | esac])dnl | ||
| 85 | $1="$ac_cv_path_$1" | ||
| 86 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | ||
| 87 | AC_MSG_RESULT([$]$1) | ||
| 88 | else | ||
| 89 | AC_MSG_RESULT(no) | ||
| 90 | fi | ||
| 91 | AC_SUBST($1)dnl | ||
| 92 | ]) | ||
diff --git a/m4/regex.m4 b/m4/regex.m4 deleted file mode 100644 index 8ea4fe94..00000000 --- a/m4/regex.m4 +++ /dev/null | |||
| @@ -1,187 +0,0 @@ | |||
| 1 | #serial 31 | ||
| 2 | |||
| 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free | ||
| 4 | # Software Foundation, Inc. | ||
| 5 | # | ||
| 6 | # This file is free software; the Free Software Foundation | ||
| 7 | # gives unlimited permission to copy and/or distribute it, | ||
| 8 | # with or without modifications, as long as this notice is preserved. | ||
| 9 | |||
| 10 | dnl Initially derived from code in GNU grep. | ||
| 11 | dnl Mostly written by Jim Meyering. | ||
| 12 | |||
| 13 | AC_PREREQ([2.50]) | ||
| 14 | |||
| 15 | AC_DEFUN([gl_REGEX], | ||
| 16 | [ | ||
| 17 | AC_REQUIRE([AC_SYS_LARGEFILE]) dnl for a sufficently-wide off_t | ||
| 18 | |||
| 19 | AC_CACHE_CHECK([whether off_t can be used in a switch statement], | ||
| 20 | [gl_cv_type_off_t_switch], | ||
| 21 | [AC_COMPILE_IFELSE( | ||
| 22 | [AC_LANG_PROGRAM( | ||
| 23 | [AC_INCLUDES_DEFAULT], | ||
| 24 | [[off_t o = -1; | ||
| 25 | switch (o) | ||
| 26 | { | ||
| 27 | case -2: | ||
| 28 | return 1; | ||
| 29 | case -1: | ||
| 30 | return 2; | ||
| 31 | default: | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | ]])], | ||
| 35 | [gl_cv_type_off_t_switch=yes], | ||
| 36 | [gl_cv_type_off_t_switch=no])]) | ||
| 37 | if test $gl_cv_type_off_t_switch = yes; then | ||
| 38 | AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, | ||
| 39 | [Define if you want regoff_t to be at least as wide POSIX requires.]) | ||
| 40 | fi | ||
| 41 | |||
| 42 | AC_LIBSOURCES( | ||
| 43 | [regcomp.c, regex.c, regex.h, | ||
| 44 | regex_internal.c, regex_internal.h, regexec.c]) | ||
| 45 | |||
| 46 | AC_ARG_WITH([included-regex], | ||
| 47 | [AC_HELP_STRING([--without-included-regex], | ||
| 48 | [don't compile regex; this is the default on | ||
| 49 | systems with recent-enough versions of the GNU C | ||
| 50 | Library (use with caution on other systems)])]) | ||
| 51 | |||
| 52 | case $with_included_regex in | ||
| 53 | yes|no) ac_use_included_regex=$with_included_regex | ||
| 54 | ;; | ||
| 55 | '') | ||
| 56 | # If the system regex support is good enough that it passes the the | ||
| 57 | # following run test, then default to *not* using the included regex.c. | ||
| 58 | # If cross compiling, assume the test would fail and use the included | ||
| 59 | # regex.c. The first failing regular expression is from `Spencer ere | ||
| 60 | # test #75' in grep-2.3. | ||
| 61 | AC_CACHE_CHECK([for working re_compile_pattern], | ||
| 62 | [gl_cv_func_re_compile_pattern_broken], | ||
| 63 | [AC_RUN_IFELSE( | ||
| 64 | [AC_LANG_PROGRAM( | ||
| 65 | [AC_INCLUDES_DEFAULT | ||
| 66 | #include <regex.h>], | ||
| 67 | [[static struct re_pattern_buffer regex; | ||
| 68 | const char *s; | ||
| 69 | struct re_registers regs; | ||
| 70 | /* Use the POSIX-compliant spelling with leading REG_, | ||
| 71 | rather than the traditional GNU spelling with leading RE_, | ||
| 72 | so that we reject older libc implementations. */ | ||
| 73 | re_set_syntax (REG_SYNTAX_POSIX_EGREP); | ||
| 74 | memset (®ex, 0, sizeof (regex)); | ||
| 75 | s = re_compile_pattern ("a[:@:>@:]b\n", 9, ®ex); | ||
| 76 | /* This should fail with _Invalid character class name_ error. */ | ||
| 77 | if (!s) | ||
| 78 | exit (1); | ||
| 79 | |||
| 80 | /* This should succeed, but does not for e.g. glibc-2.1.3. */ | ||
| 81 | memset (®ex, 0, sizeof (regex)); | ||
| 82 | s = re_compile_pattern ("{1", 2, ®ex); | ||
| 83 | |||
| 84 | if (s) | ||
| 85 | exit (1); | ||
| 86 | |||
| 87 | /* The following example is derived from a problem report | ||
| 88 | against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */ | ||
| 89 | memset (®ex, 0, sizeof (regex)); | ||
| 90 | s = re_compile_pattern ("[an\371]*n", 7, ®ex); | ||
| 91 | if (s) | ||
| 92 | exit (1); | ||
| 93 | |||
| 94 | /* This should match, but does not for e.g. glibc-2.2.1. */ | ||
| 95 | if (re_match (®ex, "an", 2, 0, ®s) != 2) | ||
| 96 | exit (1); | ||
| 97 | |||
| 98 | memset (®ex, 0, sizeof (regex)); | ||
| 99 | s = re_compile_pattern ("x", 1, ®ex); | ||
| 100 | if (s) | ||
| 101 | exit (1); | ||
| 102 | |||
| 103 | /* The version of regex.c in e.g. GNU libc-2.2.93 did not | ||
| 104 | work with a negative RANGE argument. */ | ||
| 105 | if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) | ||
| 106 | exit (1); | ||
| 107 | |||
| 108 | /* The version of regex.c in older versions of gnulib | ||
| 109 | ignored REG_IGNORE_CASE (which was then called RE_ICASE). | ||
| 110 | Detect that problem too. */ | ||
| 111 | memset (®ex, 0, sizeof (regex)); | ||
| 112 | re_set_syntax (REG_SYNTAX_EMACS | REG_IGNORE_CASE); | ||
| 113 | s = re_compile_pattern ("x", 1, ®ex); | ||
| 114 | if (s) | ||
| 115 | exit (1); | ||
| 116 | |||
| 117 | if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) | ||
| 118 | exit (1); | ||
| 119 | |||
| 120 | /* REG_STARTEND was added to glibc on 2004-01-15. | ||
| 121 | Reject older versions. */ | ||
| 122 | if (! REG_STARTEND) | ||
| 123 | exit (1); | ||
| 124 | |||
| 125 | /* Reject hosts whose regoff_t values are too narrow. | ||
| 126 | These include glibc 2.3.5 on hosts with 64-bit off_t | ||
| 127 | and 32-bit int, and Solaris 10 on hosts with 32-bit int | ||
| 128 | and _FILE_OFFSET_BITS=64. */ | ||
| 129 | if (sizeof (regoff_t) < sizeof (off_t)) | ||
| 130 | exit (1); | ||
| 131 | |||
| 132 | exit (0);]])], | ||
| 133 | [gl_cv_func_re_compile_pattern_broken=no], | ||
| 134 | [gl_cv_func_re_compile_pattern_broken=yes], | ||
| 135 | dnl When crosscompiling, assume it is broken. | ||
| 136 | [gl_cv_func_re_compile_pattern_broken=yes])]) | ||
| 137 | ac_use_included_regex=$gl_cv_func_re_compile_pattern_broken | ||
| 138 | ;; | ||
| 139 | *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) | ||
| 140 | ;; | ||
| 141 | esac | ||
| 142 | |||
| 143 | if test $ac_use_included_regex = yes; then | ||
| 144 | AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], | ||
| 145 | [Define to rpl_re_syntax_options if the replacement should be used.]) | ||
| 146 | AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], | ||
| 147 | [Define to rpl_re_set_syntax if the replacement should be used.]) | ||
| 148 | AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], | ||
| 149 | [Define to rpl_re_compile_pattern if the replacement should be used.]) | ||
| 150 | AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], | ||
| 151 | [Define to rpl_re_compile_fastmap if the replacement should be used.]) | ||
| 152 | AC_DEFINE([re_search], [rpl_re_search], | ||
| 153 | [Define to rpl_re_search if the replacement should be used.]) | ||
| 154 | AC_DEFINE([re_search_2], [rpl_re_search_2], | ||
| 155 | [Define to rpl_re_search_2 if the replacement should be used.]) | ||
| 156 | AC_DEFINE([re_match], [rpl_re_match], | ||
| 157 | [Define to rpl_re_match if the replacement should be used.]) | ||
| 158 | AC_DEFINE([re_match_2], [rpl_re_match_2], | ||
| 159 | [Define to rpl_re_match_2 if the replacement should be used.]) | ||
| 160 | AC_DEFINE([re_set_registers], [rpl_re_set_registers], | ||
| 161 | [Define to rpl_re_set_registers if the replacement should be used.]) | ||
| 162 | AC_DEFINE([re_comp], [rpl_re_comp], | ||
| 163 | [Define to rpl_re_comp if the replacement should be used.]) | ||
| 164 | AC_DEFINE([re_exec], [rpl_re_exec], | ||
| 165 | [Define to rpl_re_exec if the replacement should be used.]) | ||
| 166 | AC_DEFINE([regcomp], [rpl_regcomp], | ||
| 167 | [Define to rpl_regcomp if the replacement should be used.]) | ||
| 168 | AC_DEFINE([regexec], [rpl_regexec], | ||
| 169 | [Define to rpl_regexec if the replacement should be used.]) | ||
| 170 | AC_DEFINE([regerror], [rpl_regerror], | ||
| 171 | [Define to rpl_regerror if the replacement should be used.]) | ||
| 172 | AC_DEFINE([regfree], [rpl_regfree], | ||
| 173 | [Define to rpl_regfree if the replacement should be used.]) | ||
| 174 | AC_LIBOBJ([regex]) | ||
| 175 | gl_PREREQ_REGEX | ||
| 176 | fi | ||
| 177 | ]) | ||
| 178 | |||
| 179 | # Prerequisites of lib/regex.c and lib/regex_internal.c. | ||
| 180 | AC_DEFUN([gl_PREREQ_REGEX], | ||
| 181 | [ | ||
| 182 | AC_REQUIRE([AC_GNU_SOURCE]) | ||
| 183 | AC_REQUIRE([gl_C_RESTRICT]) | ||
| 184 | AC_REQUIRE([AM_LANGINFO_CODESET]) | ||
| 185 | AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h]) | ||
| 186 | AC_CHECK_FUNCS_ONCE([isblank mbrtowc mempcpy wcrtomb wcscoll]) | ||
| 187 | ]) | ||
diff --git a/m4/restrict.m4 b/m4/restrict.m4 deleted file mode 100644 index 1f3bbb92..00000000 --- a/m4/restrict.m4 +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #serial 1003 | ||
| 2 | dnl Copyright (C) 2003 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | # This macro can be removed once we can rely on Autoconf 2.57a or later, | ||
| 8 | # since we can then use its AC_C_RESTRICT. | ||
| 9 | |||
| 10 | # gl_C_RESTRICT | ||
| 11 | # -------------- | ||
| 12 | # Determine whether the C/C++ compiler supports the "restrict" keyword | ||
| 13 | # introduced in ANSI C99, or an equivalent. Do nothing if the compiler | ||
| 14 | # accepts it. Otherwise, if the compiler supports an equivalent, | ||
| 15 | # define "restrict" to be that. Here are some variants: | ||
| 16 | # - GCC supports both __restrict and __restrict__ | ||
| 17 | # - older DEC Alpha C compilers support only __restrict | ||
| 18 | # - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C | ||
| 19 | # Otherwise, define "restrict" to be empty. | ||
| 20 | AC_DEFUN([gl_C_RESTRICT], | ||
| 21 | [AC_CACHE_CHECK([for C/C++ restrict keyword], gl_cv_c_restrict, | ||
| 22 | [gl_cv_c_restrict=no | ||
| 23 | # Try the official restrict keyword, then gcc's __restrict, and | ||
| 24 | # the less common variants. | ||
| 25 | for ac_kw in restrict __restrict __restrict__ _Restrict; do | ||
| 26 | AC_COMPILE_IFELSE([AC_LANG_SOURCE( | ||
| 27 | [float * $ac_kw x;])], | ||
| 28 | [gl_cv_c_restrict=$ac_kw; break]) | ||
| 29 | done | ||
| 30 | ]) | ||
| 31 | case $gl_cv_c_restrict in | ||
| 32 | restrict) ;; | ||
| 33 | no) AC_DEFINE(restrict,, | ||
| 34 | [Define to equivalent of C99 restrict keyword, or to nothing if this | ||
| 35 | is not supported. Do not define if restrict is supported directly.]) ;; | ||
| 36 | *) AC_DEFINE_UNQUOTED(restrict, $gl_cv_c_restrict) ;; | ||
| 37 | esac | ||
| 38 | ]) | ||
diff --git a/m4/signed.m4 b/m4/signed.m4 deleted file mode 100644 index 048f5936..00000000 --- a/m4/signed.m4 +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | # signed.m4 serial 1 (gettext-0.10.40) | ||
| 2 | dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | |||
| 9 | AC_DEFUN([bh_C_SIGNED], | ||
| 10 | [ | ||
| 11 | AC_CACHE_CHECK([for signed], bh_cv_c_signed, | ||
| 12 | [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) | ||
| 13 | if test $bh_cv_c_signed = no; then | ||
| 14 | AC_DEFINE(signed, , | ||
| 15 | [Define to empty if the C compiler doesn't support this keyword.]) | ||
| 16 | fi | ||
| 17 | ]) | ||
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 deleted file mode 100644 index 162f1dfc..00000000 --- a/m4/stdbool.m4 +++ /dev/null | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | # Check for stdbool.h that conforms to C99. | ||
| 2 | |||
| 3 | dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | # Prepare for substituting <stdbool.h> if it is not supported. | ||
| 9 | |||
| 10 | AC_DEFUN([AM_STDBOOL_H], | ||
| 11 | [ | ||
| 12 | AC_REQUIRE([AC_HEADER_STDBOOL]) | ||
| 13 | |||
| 14 | # Define two additional variables used in the Makefile substitution. | ||
| 15 | |||
| 16 | if test "$ac_cv_header_stdbool_h" = yes; then | ||
| 17 | STDBOOL_H='' | ||
| 18 | else | ||
| 19 | STDBOOL_H='stdbool.h' | ||
| 20 | fi | ||
| 21 | AC_SUBST([STDBOOL_H]) | ||
| 22 | |||
| 23 | if test "$ac_cv_type__Bool" = yes; then | ||
| 24 | HAVE__BOOL=1 | ||
| 25 | else | ||
| 26 | HAVE__BOOL=0 | ||
| 27 | fi | ||
| 28 | AC_SUBST([HAVE__BOOL]) | ||
| 29 | ]) | ||
| 30 | |||
| 31 | # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. | ||
| 32 | AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) | ||
| 33 | |||
| 34 | # This macro is only needed in autoconf <= 2.59. Newer versions of autoconf | ||
| 35 | # have this macro built-in. | ||
| 36 | |||
| 37 | AC_DEFUN([AC_HEADER_STDBOOL], | ||
| 38 | [AC_CACHE_CHECK([for stdbool.h that conforms to C99], | ||
| 39 | [ac_cv_header_stdbool_h], | ||
| 40 | [AC_TRY_COMPILE( | ||
| 41 | [ | ||
| 42 | #include <stdbool.h> | ||
| 43 | #ifndef bool | ||
| 44 | "error: bool is not defined" | ||
| 45 | #endif | ||
| 46 | #ifndef false | ||
| 47 | "error: false is not defined" | ||
| 48 | #endif | ||
| 49 | #if false | ||
| 50 | "error: false is not 0" | ||
| 51 | #endif | ||
| 52 | #ifndef true | ||
| 53 | "error: true is not defined" | ||
| 54 | #endif | ||
| 55 | #if true != 1 | ||
| 56 | "error: true is not 1" | ||
| 57 | #endif | ||
| 58 | #ifndef __bool_true_false_are_defined | ||
| 59 | "error: __bool_true_false_are_defined is not defined" | ||
| 60 | #endif | ||
| 61 | |||
| 62 | struct s { _Bool s: 1; _Bool t; } s; | ||
| 63 | |||
| 64 | char a[true == 1 ? 1 : -1]; | ||
| 65 | char b[false == 0 ? 1 : -1]; | ||
| 66 | char c[__bool_true_false_are_defined == 1 ? 1 : -1]; | ||
| 67 | char d[(bool) -0.5 == true ? 1 : -1]; | ||
| 68 | bool e = &s; | ||
| 69 | char f[(_Bool) -0.0 == false ? 1 : -1]; | ||
| 70 | char g[true]; | ||
| 71 | char h[sizeof (_Bool)]; | ||
| 72 | char i[sizeof s.t]; | ||
| 73 | enum { j = false, k = true, l = false * true, m = true * 256 }; | ||
| 74 | _Bool n[m]; | ||
| 75 | char o[sizeof n == m * sizeof n[0] ? 1 : -1]; | ||
| 76 | char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; | ||
| 77 | #if defined __xlc__ || __GNUC__ | ||
| 78 | /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 | ||
| 79 | reported by James Lemley on 2005-10-05; see | ||
| 80 | <http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>. | ||
| 81 | This test is not quite right, since xlc is allowed to | ||
| 82 | reject this program, as the initializer for xlcbug is | ||
| 83 | not one of the forms that C requires support for. | ||
| 84 | However, doing the test right would require a run-time | ||
| 85 | test, and that would make cross-compilation harder. | ||
| 86 | Let us hope that IBM fixes the xlc bug, and also adds | ||
| 87 | support for this kind of constant expression. In the | ||
| 88 | meantime, this test will reject xlc, which is OK, since | ||
| 89 | our stdbool.h substitute should suffice. */ | ||
| 90 | char digs[] = "0123456789"; | ||
| 91 | int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); | ||
| 92 | #endif | ||
| 93 | _Bool q = true; | ||
| 94 | _Bool *pq = &q; | ||
| 95 | ], | ||
| 96 | [ | ||
| 97 | *pq |= q; | ||
| 98 | *pq |= ! q; | ||
| 99 | /* Refer to every declared value, to avoid compiler optimizations. */ | ||
| 100 | return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l | ||
| 101 | + !m + !n + !o + !p + !q + !pq); | ||
| 102 | ], | ||
| 103 | [ac_cv_header_stdbool_h=yes], | ||
| 104 | [ac_cv_header_stdbool_h=no])]) | ||
| 105 | AC_CHECK_TYPES([_Bool]) | ||
| 106 | if test $ac_cv_header_stdbool_h = yes; then | ||
| 107 | AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.]) | ||
| 108 | fi]) | ||
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 deleted file mode 100644 index 3355f35a..00000000 --- a/m4/stdint_h.m4 +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | # stdint_h.m4 serial 5 | ||
| 2 | dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, | ||
| 10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
| 11 | |||
| 12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], | ||
| 13 | [ | ||
| 14 | AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, | ||
| 15 | [AC_TRY_COMPILE( | ||
| 16 | [#include <sys/types.h> | ||
| 17 | #include <stdint.h>], | ||
| 18 | [uintmax_t i = (uintmax_t) -1;], | ||
| 19 | gl_cv_header_stdint_h=yes, | ||
| 20 | gl_cv_header_stdint_h=no)]) | ||
| 21 | if test $gl_cv_header_stdint_h = yes; then | ||
| 22 | AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, | ||
| 23 | [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, | ||
| 24 | and declares uintmax_t. ]) | ||
| 25 | fi | ||
| 26 | ]) | ||
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index bf83ed74..00000000 --- a/m4/uintmax_t.m4 +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | # uintmax_t.m4 serial 9 | ||
| 2 | dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | AC_PREREQ(2.13) | ||
| 10 | |||
| 11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' | ||
| 12 | # if it is not already defined in <stdint.h> or <inttypes.h>. | ||
| 13 | |||
| 14 | AC_DEFUN([gl_AC_TYPE_UINTMAX_T], | ||
| 15 | [ | ||
| 16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
| 17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
| 18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then | ||
| 19 | AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) | ||
| 20 | test $ac_cv_type_unsigned_long_long = yes \ | ||
| 21 | && ac_type='unsigned long long' \ | ||
| 22 | || ac_type='unsigned long' | ||
| 23 | AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, | ||
| 24 | [Define to unsigned long or unsigned long long | ||
| 25 | if <stdint.h> and <inttypes.h> don't define.]) | ||
| 26 | else | ||
| 27 | AC_DEFINE(HAVE_UINTMAX_T, 1, | ||
| 28 | [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) | ||
| 29 | fi | ||
| 30 | ]) | ||
diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 deleted file mode 100644 index dee10ccc..00000000 --- a/m4/ulonglong.m4 +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | # ulonglong.m4 serial 4 | ||
| 2 | dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Paul Eggert. | ||
| 8 | |||
| 9 | # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. | ||
| 10 | |||
| 11 | AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], | ||
| 12 | [ | ||
| 13 | AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, | ||
| 14 | [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], | ||
| 15 | [unsigned long long ullmax = (unsigned long long) -1; | ||
| 16 | return ull << i | ull >> i | ullmax / ull | ullmax % ull;], | ||
| 17 | ac_cv_type_unsigned_long_long=yes, | ||
| 18 | ac_cv_type_unsigned_long_long=no)]) | ||
| 19 | if test $ac_cv_type_unsigned_long_long = yes; then | ||
| 20 | AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, | ||
| 21 | [Define if you have the 'unsigned long long' type.]) | ||
| 22 | fi | ||
| 23 | ]) | ||
diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4 deleted file mode 100644 index 6fbe4c6f..00000000 --- a/m4/unistd-safer.m4 +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | #serial 7 | ||
| 2 | dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_UNISTD_SAFER], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([dup-safer.c, fd-safer.c, pipe-safer.c, unistd-safer.h, unistd--.h]) | ||
| 10 | AC_LIBOBJ([dup-safer]) | ||
| 11 | AC_LIBOBJ([fd-safer]) | ||
| 12 | AC_LIBOBJ([pipe-safer]) | ||
| 13 | ]) | ||
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4 deleted file mode 100644 index 6cbacb00..00000000 --- a/m4/unlocked-io.m4 +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | # unlocked-io.m4 serial 12 | ||
| 2 | |||
| 3 | # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software | ||
| 4 | # Foundation, Inc. | ||
| 5 | # | ||
| 6 | # This file is free software; the Free Software Foundation | ||
| 7 | # gives unlimited permission to copy and/or distribute it, | ||
| 8 | # with or without modifications, as long as this notice is preserved. | ||
| 9 | |||
| 10 | dnl From Jim Meyering. | ||
| 11 | dnl | ||
| 12 | dnl See if the glibc *_unlocked I/O macros or functions are available. | ||
| 13 | dnl Use only those *_unlocked macros or functions that are declared | ||
| 14 | dnl (because some of them were declared in Solaris 2.5.1 but were removed | ||
| 15 | dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run | ||
| 16 | dnl on Solaris 2.6). | ||
| 17 | |||
| 18 | AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], | ||
| 19 | [ | ||
| 20 | AC_LIBSOURCES([unlocked-io.h]) | ||
| 21 | |||
| 22 | AC_DEFINE([USE_UNLOCKED_IO], 1, | ||
| 23 | [Define to 1 if you want getc etc. to use unlocked I/O if available. | ||
| 24 | Unlocked I/O can improve performance in unithreaded apps, | ||
| 25 | but it is not safe for multithreaded apps.]) | ||
| 26 | |||
| 27 | dnl Persuade glibc and Solaris <stdio.h> to declare | ||
| 28 | dnl fgets_unlocked(), fputs_unlocked() etc. | ||
| 29 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
| 30 | |||
| 31 | AC_CHECK_DECLS_ONCE( | ||
| 32 | [clearerr_unlocked feof_unlocked ferror_unlocked | ||
| 33 | fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked | ||
| 34 | fread_unlocked fwrite_unlocked getc_unlocked | ||
| 35 | getchar_unlocked putc_unlocked putchar_unlocked]) | ||
| 36 | ]) | ||
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 deleted file mode 100644 index cde2129a..00000000 --- a/m4/wchar_t.m4 +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | # wchar_t.m4 serial 1 (gettext-0.12) | ||
| 2 | dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | dnl Test whether <stddef.h> has the 'wchar_t' type. | ||
| 9 | dnl Prerequisite: AC_PROG_CC | ||
| 10 | |||
| 11 | AC_DEFUN([gt_TYPE_WCHAR_T], | ||
| 12 | [ | ||
| 13 | AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, | ||
| 14 | [AC_TRY_COMPILE([#include <stddef.h> | ||
| 15 | wchar_t foo = (wchar_t)'\0';], , | ||
| 16 | gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) | ||
| 17 | if test $gt_cv_c_wchar_t = yes; then | ||
| 18 | AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) | ||
| 19 | fi | ||
| 20 | ]) | ||
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 deleted file mode 100644 index b8fff9c8..00000000 --- a/m4/wint_t.m4 +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | # wint_t.m4 serial 1 (gettext-0.12) | ||
| 2 | dnl Copyright (C) 2003 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl From Bruno Haible. | ||
| 8 | dnl Test whether <wchar.h> has the 'wint_t' type. | ||
| 9 | dnl Prerequisite: AC_PROG_CC | ||
| 10 | |||
| 11 | AC_DEFUN([gt_TYPE_WINT_T], | ||
| 12 | [ | ||
| 13 | AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, | ||
| 14 | [AC_TRY_COMPILE([#include <wchar.h> | ||
| 15 | wint_t foo = (wchar_t)'\0';], , | ||
| 16 | gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) | ||
| 17 | if test $gt_cv_c_wint_t = yes; then | ||
| 18 | AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) | ||
| 19 | fi | ||
| 20 | ]) | ||
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4 deleted file mode 100644 index c0847dd3..00000000 --- a/m4/xalloc.m4 +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | # xalloc.m4 serial 12 | ||
| 2 | dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_XALLOC], | ||
| 8 | [ | ||
| 9 | AC_LIBSOURCES([xmalloc.c, xalloc.h]) | ||
| 10 | AC_LIBOBJ([xmalloc]) | ||
| 11 | |||
| 12 | gl_PREREQ_XALLOC | ||
| 13 | gl_PREREQ_XMALLOC | ||
| 14 | ]) | ||
| 15 | |||
| 16 | # Prerequisites of lib/xalloc.h. | ||
| 17 | AC_DEFUN([gl_PREREQ_XALLOC], [ | ||
| 18 | : | ||
| 19 | ]) | ||
| 20 | |||
| 21 | # Prerequisites of lib/xmalloc.c. | ||
| 22 | AC_DEFUN([gl_PREREQ_XMALLOC], [ | ||
| 23 | AC_REQUIRE([AC_C_INLINE]) | ||
| 24 | : | ||
| 25 | ]) | ||
