summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorManish Singh <yosh@src.gnome.org>1999-01-13 06:53:26 +0000
committerManish Singh <yosh@src.gnome.org>1999-01-13 06:53:26 +0000
commit6790905309337a44b3ed43bf48b9b94d7c67902f (patch)
tree0dc7ba42df135280172dce84014df1ae2a1743ab /acinclude.m4
parent9da0be6730d7b7bda18d18089332f6a2c0a02c96 (diff)
downloadgtk+-6790905309337a44b3ed43bf48b9b94d7c67902f.tar.gz
acinclude.m4 ltconfig upgrade to libtool 1.2d (with fixes for irix6 and
* acinclude.m4 * ltconfig * ltmain.sh: upgrade to libtool 1.2d (with fixes for irix6 and osf) -Yosh
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m4638
1 files changed, 295 insertions, 343 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 91e8d049fa..8ce50126e3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -21,15 +21,18 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 24 AM_PROG_LIBTOOL
+# serial 29 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
AC_REQUIRE([AM_ENABLE_STATIC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AM_PROG_LD])dnl
AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AM_SYS_NM_PARSE])dnl
+AC_REQUIRE([AM_SYS_SYMBOL_UNDERSCORE])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
# Always use our own libtool.
@@ -68,16 +71,45 @@ case "$host" in
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+*-*-cygwin32*)
+ AM_SYS_LIBTOOL_CYGWIN32
;;
+
esac
+# enable the --disable-libtool-lock switch
+
+AC_ARG_ENABLE(libtool-lock,
+[ --disable-libtool-lock force libtool not to do file locking],
+need_locks=$enableval,
+need_locks=yes)
+
+if test x"$need_locks" = xno; then
+ libtool_flags="$libtool_flags --disable-lock"
+fi
+
+
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+DLLTOOL="$DLLTOOL" AS="$AS" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
])
# AM_ENABLE_SHARED - implement the --enable-shared flag
@@ -88,10 +120,8 @@ AC_DEFUN(AM_ENABLE_SHARED,
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
-<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
-[ --enable-shared=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
@@ -127,10 +157,8 @@ AC_DEFUN(AM_ENABLE_STATIC,
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
-<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
-[ --enable-static=PKGS only build shared libraries if the current package
- appears as an element in the PKGS list],
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
@@ -156,17 +184,59 @@ AC_DEFUN(AM_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
- # Accept absolute paths.
- /* | [A-Za-z]:\\*)
- test -z "$LD" && LD="$ac_prog"
- ;;
+ # Accept absolute paths.
+changequote(,)dnl
+ /* | [A-Za-z]:/*)
+ # Canonicalize the path of ld
+ re_direlt='/[^/][^/]*/\.\./'
+ sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
+changequote([,])dnl
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ case "$host_os" in
+ cygwin*)
+ # Convert to a UNC path for cygwin
+ test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"`
+ ;;
+ *)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ esac
+ ;;
+ ##
+ ## FIXME: The code fails later on if we try to use an $LD with
+ ## '\\' path separators.
+ ##
+changequote(,)dnl
+ [A-Za-z]:[\\]*)
+ # Canonicalize the path of ld
+ re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
+ sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
+changequote([,])dnl
+ sub_uncdir='s%\\%/%g'
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
+ done
+ case "$host_os" in
+ cygwin*)
+ # Convert to a UNC path for cygwin
+ test -z "$LD" && LD=`echo X$ac_prog | sed -e 's%^X%%' -e "$sub_uncdrive" -e "$sub_uncdir"`
+ ;;
+ *)
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ esac
+ ;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
@@ -227,11 +297,10 @@ fi])
AC_DEFUN(AM_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
-[case "$NM" in
-/* | [A-Za-z]:\\*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
+[if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
test -z "$ac_dir" && ac_dir=.
@@ -251,341 +320,224 @@ AC_CACHE_VAL(ac_cv_path_NM,
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
+fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# Modified to never use included libintl.
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
-#
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 5
-
-AC_DEFUN(AM_GTK_WITH_NLS,
- [AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- USE_INCLUDED_LIBINTL=no
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS)
-# AC_MSG_CHECKING([whether included gettext is requested])
-# AC_ARG_WITH(included-gettext,
-# [ --with-included-gettext use the GNU gettext library included here],
-# nls_cv_force_use_gnu_gettext=$withval,
-# nls_cv_force_use_gnu_gettext=no)
-# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
- nls_cv_force_use_gnu_gettext="no"
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If gettext or catgets are available (in this order) we
- dnl use this. Else we have to fall back to GNU NLS library.
- dnl catgets is only used if permitted by option --with-catgets.
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- AC_CHECK_HEADER(libintl.h,
- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CACHE_CHECK([for gettext in libintl],
- gt_cv_func_gettext_libintl,
- [AC_CHECK_LIB(intl, gettext,
- gt_cv_func_gettext_libintl=yes,
- gt_cv_func_gettext_libintl=no)],
- gt_cv_func_gettext_libintl=no)])
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT)
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- INSTOBJEXT=.mo
- fi
- fi
-
- # Added by Martin Baulig 12/15/98 for libc5 systems
- if test "$gt_cv_func_gettext_libc" != "yes" \
- && test "$gt_cv_func_gettext_libintl" = "yes"; then
- INTLLIBS=-lintl
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- fi
- ])
-
- if test "$CATOBJEXT" = "NONE"; then
- AC_MSG_CHECKING([whether catgets can be used])
- AC_ARG_WITH(catgets,
- [ --with-catgets use catgets functions if available],
- nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
- AC_MSG_RESULT($nls_cv_use_catgets)
-
- if test "$nls_cv_use_catgets" = "yes"; then
- dnl No gettext in C library. Try catgets next.
- AC_CHECK_LIB(i, main)
- AC_CHECK_FUNC(catgets,
- [AC_DEFINE(HAVE_CATGETS)
- INTLOBJS="\$(CATOBJS)"
- AC_PATH_PROG(GENCAT, gencat, no)dnl
-# if test "$GENCAT" != "no"; then
-# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
-# if test "$GMSGFMT" = "no"; then
-# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
-# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
-# fi
-# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-# USE_INCLUDED_LIBINTL=yes
-# CATOBJEXT=.cat
-# INSTOBJEXT=.cat
-# DATADIRNAME=lib
-# INTLDEPS='$(top_builddir)/intl/libintl.a'
-# INTLLIBS=$INTLDEPS
-# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-# nls_cv_header_intl=intl/libintl.h
-# nls_cv_header_libgt=intl/libgettext.h
-# fi
- ])
- fi
- fi
+# AM_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
+# by C symbol name from nm.
+AC_DEFUN(AM_SYS_NM_PARSE,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output])
+AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
+[# These are sane defaults that work on at least a few old systems.
+# {They come from Ultrix. What could be older than Ultrix?!! ;)}
+
+changequote(,)dnl
+# Character class describing NM global symbol codes.
+ac_symcode='[BCDEGRSTU]'
+
+# Regexp to match symbols that can be accessed directly from C.
+ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+ac_symxfrm='\1 \1'
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+ ac_symcode='[BCDTU]'
+ ;;
+sunos* | cygwin32* | mingw32*)
+ ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
+ ac_symxfrm='_\1 \1'
+ ;;
+irix*)
+ # Cannot use undefined symbols on IRIX because inlined functions mess us up.
+ ac_symcode='[BCDEGRST]'
+ ;;
+solaris*)
+ ac_symcode='[BDTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ ac_symcode='[ABCDGISTUW]'
+fi
- if test "$CATOBJEXT" = "NONE"; then
- dnl Neither gettext nor catgets in included in the C library.
- dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
+case "$host_os" in
+cygwin32* | mingw32*)
+ # We do not want undefined symbols on cygwin32. The user must
+ # arrange to define them via -l arguments.
+ ac_symcode='[ABCDGISTW]'
+ ;;
+esac
+changequote([,])dnl
+
+# Write the raw and C identifiers.
+ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"
+
+# Check to see that the pipe works correctly.
+ac_pipe_works=no
+cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func;return 0;}
+EOF
+if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+
+ # Try sorting and uniquifying the output.
+ if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
+ mv -f "$ac_nlist"T "$ac_nlist"
+ ac_wcout=`wc "$ac_nlist" 2>/dev/null`
+changequote(,)dnl
+ ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
+changequote([,])dnl
+ (test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
+ else
+ rm -f "$ac_nlist"T
+ ac_count=-1
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
+ cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
+
+ cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define __ptr_t void *
+#else
+# define __ptr_t char *
+#endif
+
+/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
+int dld_preloaded_symbol_count = $ac_count;
+
+/* The mapping between symbol names and symbols. */
+struct {
+ char *name;
+ __ptr_t address;
+}
+changequote(,)dnl
+dld_preloaded_symbols[] =
+changequote([,])dnl
+{
+EOF
+ sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (__ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftestm.$ac_objext
+ ac_save_LIBS="$LIBS"
+ ac_save_CFLAGS="$CFLAGS"
+ LIBS="conftestm.$ac_objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ ac_pipe_works=yes
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
fi
+ LIBS="$ac_save_LIBS"
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
fi
+ else
+ echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
+ fi
+ else
+ echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
+ fi
+else
+ echo "$progname: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
+fi
+rm -rf conftest*
- if test "$nls_cv_use_gnu_gettext" != "yes"; then
- AC_DEFINE(ENABLE_NLS)
-# else
-# dnl Mark actions used to generate GNU NLS library.
-# INTLOBJS="\$(GETTOBJS)"
-# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
-# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-# AC_SUBST(MSGFMT)
-# USE_INCLUDED_LIBINTL=yes
-# CATOBJEXT=.gmo
-# INSTOBJEXT=.mo
-# DATADIRNAME=share
-# INTLDEPS='$(top_builddir)/intl/libintl.a'
-# INTLLIBS=$INTLDEPS
-# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-# nls_cv_header_intl=intl/libintl.h
-# nls_cv_header_libgt=intl/libgettext.h
- fi
+# Do not use the global_symbol_pipe unless it works.
+test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=
+])
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
+ac_result=yes
+if test -z "$ac_cv_sys_global_symbol_pipe"; then
+ ac_result=no
+fi
+AC_MSG_RESULT($ac_result)
+])
- # We need to process the po/ directory.
- POSUB=po
+# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
+AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+AC_CHECK_TOOL(AS, as, false)
+])
+
+# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
+# with an underscore?
+AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
+[AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AM_SYS_NM_PARSE])dnl
+AC_MSG_CHECKING([for _ prefix in compiled symbols])
+AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
+[ac_cv_sys_symbol_underscore=no
+cat > conftest.$ac_ext <<EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+EOF
+if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
+ ac_cv_sys_symbol_underscore=yes
else
- DATADIRNAME=share
- nls_cv_header_intl=intl/libintl.h
- nls_cv_header_libgt=intl/libgettext.h
+ if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
+ fi
fi
- AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
- AC_OUTPUT_COMMANDS(
- [case "$CONFIG_FILES" in *po/Makefile.in*)
- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
- esac])
-
-
-# # If this is used in GNU gettext we have to set USE_NLS to `yes'
-# # because some of the sources are only built for this goal.
-# if test "$PACKAGE" = gettext; then
-# USE_NLS=yes
-# USE_INCLUDED_LIBINTL=yes
-# fi
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLDEPS)
- AC_SUBST(INTLLIBS)
- AC_SUBST(INTLOBJS)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-AC_DEFUN(AM_GTK_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h sys/param.h])
- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-strdup __argz_count __argz_stringify __argz_next])
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- AC_CHECK_FUNCS(stpcpy)
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY)
- fi
-
- AM_LC_MESSAGES
- AM_GTK_WITH_NLS
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
- dnl Determine which catalog format we have (if any is needed)
- dnl For now we know about two different formats:
- dnl Linux libc-5 and the normal X/Open format
- test -d intl || mkdir intl
- if test "$CATOBJEXT" = ".cat"; then
- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
- dnl Transform the SED scripts while copying because some dumb SEDs
- dnl cannot handle comments.
- sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
- fi
- dnl po2tbl.sed is always needed.
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
-
- dnl In the intl/Makefile.in we have a special dependency which makes
- dnl only sense for gettext. We comment this out for non-gettext
- dnl packages.
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
- AC_SUBST(GT_NO)
- AC_SUBST(GT_YES)
-
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
- dnl Try to locate is.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
-
- dnl *** For now the libtool support in intl/Makefile is not for real.
- l=
- AC_SUBST(l)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile.
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- ])
-
+ else
+ echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
+ fi
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
+fi
+rm -rf conftest*
+])
+AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
+if test x$ac_cv_sys_symbol_underscore = xyes; then
+ AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
+ [define if compiled symbols have a leading underscore])
+fi
+])