From 802fbf524324e05e4ac149c43a2ac548ce2c5f38 Mon Sep 17 00:00:00 2001 From: Benedikt Meurer <benny@xfce.org> Date: Fri, 13 Jun 2003 22:35:59 +0000 Subject: [PATCH] Fixed bind_textdomain_codeset() problem on linux. (Old svn revision: 11164) --- aclocal.m4 | 58 +++++------------- configure | 172 +++++++++++++++++++++++++++++++++++++++++++++-------- m4/i18n.m4 | 3 + 3 files changed, 163 insertions(+), 70 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index a48e65020..a360f878b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.7.3 -*- Autoconf -*- +# generated automatically by aclocal 1.7.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -16,7 +16,7 @@ # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -34,14 +34,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - +# serial 10 AC_PREREQ([2.54]) @@ -170,7 +163,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.3])]) + [AM_AUTOMAKE_VERSION([1.7.5])]) # Helper functions for option handling. -*- Autoconf -*- @@ -720,7 +713,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -745,8 +738,9 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) @@ -774,9 +768,9 @@ if test "$am__include" = "#"; then _am_result=BSD fi fi -AC_SUBST(am__include) -AC_SUBST(am__quote) -AC_MSG_RESULT($_am_result) +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) @@ -889,33 +883,6 @@ AC_DEFUN([AM_MAINTAINER_MODE], AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -# isc-posix.m4 serial 2 (gettext-0.11.2) -dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN([AC_ISC_POSIX], - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) - # serial 46 AC_PROG_LIBTOOL AC_DEFUN([AC_PROG_LIBTOOL], @@ -1492,7 +1459,7 @@ irix5* | irix6*) # This must be Linux ELF. linux-gnu*) case $host_cpu in - alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* ) + alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM @@ -1764,6 +1731,9 @@ AC_DEFUN([BM_I18N], AM_GLIB_GNU_GETTEXT + dnl This is required on some linux systems + AC_CHECK_FUNC([bind_textdomain_codeset]) + AC_MSG_CHECKING([for locales directory]) AC_ARG_WITH([locales-dir], AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR]), diff --git a/configure b/configure index a1d57a40e..f3803efd9 100755 --- a/configure +++ b/configure @@ -1734,8 +1734,9 @@ DEPDIR="${am__leading_dot}deps" am_make=${MAKE-make} cat > confinc << 'END' -doit: +am__doit: @echo done +.PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 @@ -3027,14 +3028,13 @@ fi rm -f conftest* - - echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 -echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 -if test "${ac_cv_lib_cposix_strerror+set}" = set; then +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcposix $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ @@ -3070,23 +3070,69 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_cposix_strerror=yes + ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_cposix_strerror=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test "$ac_cv_search_strerror" = no; then + for ac_lib in cposix; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 -echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 -if test $ac_cv_lib_cposix_strerror = yes; then - LIBS="$LIBS -lcposix" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" - +fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 @@ -4679,7 +4725,7 @@ irix5* | irix6*) # This must be Linux ELF. linux-gnu*) case $host_cpu in - alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* ) + alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM @@ -5079,7 +5125,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 5082 "configure"' > conftest.$ac_ext + echo '#line 5128 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6723,6 +6769,80 @@ echo "${ECHO_T}$LINGUAS" >&6 < $srcdir/po/POTFILES.in > po/POTFILES + echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 +echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6 +if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char bind_textdomain_codeset (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char bind_textdomain_codeset (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_bind_textdomain_codeset) || defined (__stub___bind_textdomain_codeset) +choke me +#else +char (*f) () = bind_textdomain_codeset; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != bind_textdomain_codeset; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_bind_textdomain_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_bind_textdomain_codeset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 +echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6 + + echo "$as_me:$LINENO: checking for locales directory" >&5 echo $ECHO_N "checking for locales directory... $ECHO_C" >&6 @@ -8368,23 +8488,23 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo "$as_me:$LINENO: checking for libxfcegui4-1.0 >= 0.0.23" >&5 -echo $ECHO_N "checking for libxfcegui4-1.0 >= 0.0.23... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking for libxfcegui4-1.0 >= 3.91.0" >&5 +echo $ECHO_N "checking for libxfcegui4-1.0 >= 3.91.0... $ECHO_C" >&6 - if $PKG_CONFIG --exists "libxfcegui4-1.0 >= 0.0.23" ; then + if $PKG_CONFIG --exists "libxfcegui4-1.0 >= 3.91.0" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking LIBXFCEGUI4_CFLAGS" >&5 echo $ECHO_N "checking LIBXFCEGUI4_CFLAGS... $ECHO_C" >&6 - LIBXFCEGUI4_CFLAGS=`$PKG_CONFIG --cflags "libxfcegui4-1.0 >= 0.0.23"` + LIBXFCEGUI4_CFLAGS=`$PKG_CONFIG --cflags "libxfcegui4-1.0 >= 3.91.0"` echo "$as_me:$LINENO: result: $LIBXFCEGUI4_CFLAGS" >&5 echo "${ECHO_T}$LIBXFCEGUI4_CFLAGS" >&6 echo "$as_me:$LINENO: checking LIBXFCEGUI4_LIBS" >&5 echo $ECHO_N "checking LIBXFCEGUI4_LIBS... $ECHO_C" >&6 - LIBXFCEGUI4_LIBS=`$PKG_CONFIG --libs "libxfcegui4-1.0 >= 0.0.23"` + LIBXFCEGUI4_LIBS=`$PKG_CONFIG --libs "libxfcegui4-1.0 >= 3.91.0"` echo "$as_me:$LINENO: result: $LIBXFCEGUI4_LIBS" >&5 echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 else @@ -8392,7 +8512,7 @@ echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 LIBXFCEGUI4_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - LIBXFCEGUI4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxfcegui4-1.0 >= 0.0.23"` + LIBXFCEGUI4_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxfcegui4-1.0 >= 3.91.0"` echo $LIBXFCEGUI4_PKG_ERRORS fi @@ -8407,12 +8527,12 @@ echo "${ECHO_T}$LIBXFCEGUI4_LIBS" >&6 if test $succeeded = yes; then : else - { { echo "$as_me:$LINENO: error: Library requirements (libxfcegui4-1.0 >= 0.0.23) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (libxfcegui4-1.0 >= 0.0.23) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { { echo "$as_me:$LINENO: error: Library requirements (libxfcegui4-1.0 >= 3.91.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (libxfcegui4-1.0 >= 3.91.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi - LIBXFCEGUI4_REQUIRED_VERSION=0.0.23 + LIBXFCEGUI4_REQUIRED_VERSION=3.91.0 diff --git a/m4/i18n.m4 b/m4/i18n.m4 index b1a9d462e..e18c7a703 100644 --- a/m4/i18n.m4 +++ b/m4/i18n.m4 @@ -14,6 +14,9 @@ AC_DEFUN([BM_I18N], AM_GLIB_GNU_GETTEXT + dnl This is required on some linux systems + AC_CHECK_FUNC([bind_textdomain_codeset]) + AC_MSG_CHECKING([for locales directory]) AC_ARG_WITH([locales-dir], AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR]), -- GitLab