|
Packit |
5b56b6 |
dnl Configuration for the gettext-runtime directory of GNU gettext
|
|
Packit |
5b56b6 |
dnl Copyright (C) 1995-2010, 2015 Free Software Foundation, Inc.
|
|
Packit |
5b56b6 |
dnl
|
|
Packit |
5b56b6 |
dnl This program is free software: you can redistribute it and/or modify
|
|
Packit |
5b56b6 |
dnl it under the terms of the GNU General Public License as published by
|
|
Packit |
5b56b6 |
dnl the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
5b56b6 |
dnl (at your option) any later version.
|
|
Packit |
5b56b6 |
dnl
|
|
Packit |
5b56b6 |
dnl This program is distributed in the hope that it will be useful,
|
|
Packit |
5b56b6 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
5b56b6 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
5b56b6 |
dnl GNU General Public License for more details.
|
|
Packit |
5b56b6 |
dnl
|
|
Packit |
5b56b6 |
dnl You should have received a copy of the GNU General Public License
|
|
Packit |
5b56b6 |
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Process this file with autoconf to produce a configure script.
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_PREREQ([2.62])
|
|
Packit |
5b56b6 |
AC_INIT([gettext-runtime],
|
|
Packit |
5b56b6 |
m4_esyscmd([../build-aux/git-version-gen ../.tarball-version]),
|
|
Packit |
5b56b6 |
[bug-gnu-gettext@gnu.org])
|
|
Packit |
5b56b6 |
AC_CONFIG_SRCDIR([intl/dcigettext.c])
|
|
Packit |
5b56b6 |
AC_CONFIG_AUX_DIR([../build-aux])
|
|
Packit |
5b56b6 |
AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
|
|
Packit |
5b56b6 |
AC_CONFIG_HEADERS([config.h])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Installation directories.
|
|
Packit |
5b56b6 |
test "$docdir" != '${datarootdir}/doc/${PACKAGE_TARNAME}' || docdir='${datarootdir}/doc/gettext'
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for programs.
|
|
Packit |
5b56b6 |
AC_PROG_CC
|
|
Packit |
5b56b6 |
AC_PROG_INSTALL
|
|
Packit |
5b56b6 |
AC_PROG_YACC
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
gt_JAVA_CHOICE
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
gt_JAVACOMP([1.3], [1.1])
|
|
Packit |
5b56b6 |
AC_CHECK_PROG([JAR], [jar], [jar])
|
|
Packit |
5b56b6 |
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
|
|
Packit |
5b56b6 |
BUILDJAVA=yes
|
|
Packit |
5b56b6 |
else
|
|
Packit |
5b56b6 |
BUILDJAVA=no
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AC_SUBST([BUILDJAVA])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
gt_CSHARPCOMP
|
|
Packit |
5b56b6 |
if test -n "$HAVE_CSHARPCOMP" && test "$CSHARP_CHOICE" != no; then
|
|
Packit |
5b56b6 |
BUILDCSHARP=yes
|
|
Packit |
5b56b6 |
else
|
|
Packit |
5b56b6 |
BUILDCSHARP=no
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AC_SUBST([BUILDCSHARP])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Check for host type.
|
|
Packit |
5b56b6 |
AC_CANONICAL_HOST
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for compiler output filename suffixes.
|
|
Packit |
5b56b6 |
AC_OBJEXT
|
|
Packit |
5b56b6 |
AC_EXEEXT
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Make sure we see all GNU and Solaris extensions.
|
|
Packit |
5b56b6 |
gl_EARLY
|
|
Packit |
5b56b6 |
AM_PROG_CC_C_O
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Check for build configuration.
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
gl_WOE32_DLL
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
LT_INIT([win32-dll])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Prepares the libtool configuration for handling of Windows resources, and
|
|
Packit |
5b56b6 |
dnl sets the RC variable to a program that compiles Windows resource files.
|
|
Packit |
5b56b6 |
LT_LANG([Windows Resource])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl On mingw and Cygwin, we can activate special Makefile rules which add
|
|
Packit |
5b56b6 |
dnl version information to the shared libraries and executables.
|
|
Packit |
5b56b6 |
case "$host_os" in
|
|
Packit |
5b56b6 |
mingw* | cygwin*) is_woe32=yes ;;
|
|
Packit |
5b56b6 |
*) is_woe32=no ;;
|
|
Packit |
5b56b6 |
esac
|
|
Packit |
5b56b6 |
AM_CONDITIONAL([WOE32], [test $is_woe32 = yes])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for libraries.
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl These are the only lines required to internationalize the package.
|
|
Packit |
5b56b6 |
dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
|
|
Packit |
5b56b6 |
AM_GNU_GETTEXT([use-libtool], [need-ngettext])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for header files, functions and declarations.
|
|
Packit |
5b56b6 |
gl_INIT
|
|
Packit |
5b56b6 |
AC_TYPE_SIZE_T
|
|
Packit |
5b56b6 |
AC_CHECK_FUNCS([setlocale])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Put some default definitions into config.h.
|
|
Packit |
5b56b6 |
AH_BOTTOM([
|
|
Packit |
5b56b6 |
/* On Windows, variables that may be in a DLL must be marked specially. */
|
|
Packit |
5b56b6 |
#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER
|
|
Packit |
5b56b6 |
# define DLL_VARIABLE __declspec (dllimport)
|
|
Packit |
5b56b6 |
#else
|
|
Packit |
5b56b6 |
# define DLL_VARIABLE
|
|
Packit |
5b56b6 |
#endif
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
/* Extra OS/2 (emx+gcc) defines. */
|
|
Packit |
5b56b6 |
#if defined __EMX__ && !defined __KLIBC__
|
|
Packit |
5b56b6 |
# include "intl/os2compat.h"
|
|
Packit |
5b56b6 |
#endif
|
|
Packit |
5b56b6 |
])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Compilation on mingw and Cygwin needs special Makefile rules, because
|
|
Packit |
5b56b6 |
dnl 1. when we install a shared library, we must arrange to export
|
|
Packit |
5b56b6 |
dnl auxiliary pointer variables for every exported variable,
|
|
Packit |
5b56b6 |
dnl 2. when we install a shared library and a static library simultaneously,
|
|
Packit |
5b56b6 |
dnl the include file specifies __declspec(dllimport) and therefore we
|
|
Packit |
5b56b6 |
dnl must arrange to define the auxiliary pointer variables for the
|
|
Packit |
5b56b6 |
dnl exported variables _also_ in the static library.
|
|
Packit |
5b56b6 |
if test "$enable_shared" = yes; then
|
|
Packit |
5b56b6 |
case "$host_os" in
|
|
Packit |
5b56b6 |
mingw* | cygwin*) is_woe32dll=yes ;;
|
|
Packit |
5b56b6 |
*) is_woe32dll=no ;;
|
|
Packit |
5b56b6 |
esac
|
|
Packit |
5b56b6 |
else
|
|
Packit |
5b56b6 |
is_woe32dll=no
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
|
|
Packit |
5b56b6 |
if test $is_woe32dll = yes; then
|
|
Packit |
5b56b6 |
AC_DEFINE([WOE32DLL], [1],
|
|
Packit |
5b56b6 |
[Define when --enable-shared is used on mingw or Cygwin.])
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
INTL_EXPORTS_FLAGS=
|
|
Packit |
5b56b6 |
dnl 64-bit mingw does not prepend an underscore to C symbols.
|
|
Packit |
5b56b6 |
dnl USER_LABEL_PREFIX is set by gl_ASM_SYMBOL_PREFIX, inside gl_INIT.
|
|
Packit |
5b56b6 |
if test "$USER_LABEL_PREFIX" = _; then
|
|
Packit |
5b56b6 |
INTL_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $INTL_EXPORTS_FLAGS"
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AC_SUBST([INTL_EXPORTS_FLAGS])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Check for tools needed for formatting the documentation.
|
|
Packit |
5b56b6 |
ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
|
|
Packit |
5b56b6 |
AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Check for tools needed for formatting man pages.
|
|
Packit |
5b56b6 |
CROSS_COMPILING=$cross_compiling
|
|
Packit |
5b56b6 |
AC_SUBST([CROSS_COMPILING])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for optional programs for the tests/lang-* tests.
|
|
Packit |
5b56b6 |
gl_PROG_ANSI_CXX([CXX], [ANSICXX])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Checks for special libraries for the tests/test-lock test.
|
|
Packit |
5b56b6 |
dnl On some systems, sched_yield is in librt, rather than in libpthread.
|
|
Packit |
5b56b6 |
LIBSCHED=
|
|
Packit |
5b56b6 |
if test $gl_threads_api = posix; then
|
|
Packit |
5b56b6 |
dnl Solaris has sched_yield in librt, not in libpthread or libc.
|
|
Packit |
5b56b6 |
AC_CHECK_LIB([rt], [sched_yield], [LIBSCHED=-lrt],
|
|
Packit |
5b56b6 |
[dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
|
|
Packit |
5b56b6 |
AC_CHECK_LIB([posix4], [sched_yield], [LIBSCHED=-lposix4])])
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AC_SUBST([LIBSCHED])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
dnl Determine whether to build libasprintf.
|
|
Packit |
5b56b6 |
AC_ARG_ENABLE([libasprintf],
|
|
Packit |
5b56b6 |
[ --disable-libasprintf do not build libasprintf],
|
|
Packit |
5b56b6 |
[if test "$enableval" != no; then
|
|
Packit |
5b56b6 |
SUBDIR_libasprintf=libasprintf
|
|
Packit |
5b56b6 |
else
|
|
Packit |
5b56b6 |
SUBDIR_libasprintf=
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
], [SUBDIR_libasprintf=libasprintf])
|
|
Packit |
5b56b6 |
if test "$CXX" = "no"; then
|
|
Packit |
5b56b6 |
SUBDIR_libasprintf=
|
|
Packit |
5b56b6 |
fi
|
|
Packit |
5b56b6 |
AM_CONDITIONAL([ENABLE_LIBASPRINTF], [test -n "$SUBDIR_libasprintf"])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_SUBDIRS([libasprintf])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([doc/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([intl/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([intl-java/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([intl-csharp/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([gnulib-lib/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([src/Makefile])
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([src/gettext.sh], [chmod a+x src/gettext.sh])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([po/Makefile.in])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([man/Makefile],
|
|
Packit |
5b56b6 |
[FIX_MAKEFILE_DISTRIB])
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([man/x-to-1])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([m4/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_CONFIG_FILES([tests/Makefile])
|
|
Packit |
5b56b6 |
|
|
Packit |
5b56b6 |
AC_OUTPUT
|