/[cvs]/eggdrop1.9/aclocal.m4
ViewVC logotype

Diff of /eggdrop1.9/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.52 by drummer, Sun Aug 19 02:24:40 2001 UTC revision 1.53 by ite, Tue Aug 21 00:21:17 2001 UTC
# Line 1147  fi Line 1147  fi
1147  ])dnl  ])dnl
1148    
1149    
 dnl  EGG_SUBST_EGGVERSION()  
 dnl  
 AC_DEFUN(EGG_SUBST_EGGVERSION, [dnl  
 EGGVERSION=`grep 'char.egg_version' $srcdir/src/main.c | $AWK '{gsub(/(\"|\;)/, "", [$]4); print [$]4}'`  
 egg_version_num=`echo $EGGVERSION | $AWK 'BEGIN {FS = "."} {printf("%d%02d%02d", [$]1, [$]2, [$]3)}'`  
 AC_SUBST(EGGVERSION)dnl  
 AC_DEFINE_UNQUOTED(EGG_VERSION, $egg_version_num)dnl  
 ])dnl  
   
   
 dnl  EGG_SUBST_DEST()  
 dnl  
 AC_DEFUN(EGG_SUBST_DEST, [dnl  
 if test "${DEST-x}" = "x"  
 then  
   DEST=\${prefix}  
 fi  
 AC_SUBST(DEST)dnl  
 ])dnl  
   
   
1150  dnl  EGG_SUBST_MOD_UPDIR()  dnl  EGG_SUBST_MOD_UPDIR()
1151  dnl  dnl
1152  dnl  Since module's Makefiles aren't generated by configure, some  dnl  Since module's Makefiles aren't generated by configure, some
# Line 1355  fi Line 1334  fi
1334    
1335  dnl EGG_IPV6_SUPPORTED  dnl EGG_IPV6_SUPPORTED
1336  dnl  dnl
 dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE  
 dnl            [, ACTION-IF-CROSS-COMPILING]]])  
1337  AC_DEFUN(EGG_IPV6_SUPPORTED, [dnl  AC_DEFUN(EGG_IPV6_SUPPORTED, [dnl
1338  AC_MSG_CHECKING(for kernel IPv6 support)  AC_MSG_CHECKING(for kernel IPv6 support)
1339  AC_CACHE_VAL(egg_cv_ipv6_supported,[  AC_CACHE_VAL(egg_cv_ipv6_supported,[
# Line 1385  else Line 1362  else
1362  fi  fi
1363  ])dnl  ])dnl
1364    
1365    dnl EGG_DEFINE_VERSION_NUM
1366    dnl
1367    AC_DEFUN(EGG_DEFINE_VERSION_NUM, [dnl
1368    egg_version_num=`echo $VERSION | $AWK 'BEGIN {FS = "."} {printf("%d%02d%02d00", [$]1, [$]2, [$]3)}'`
1369    AC_DEFINE_UNQUOTED(VERSION_NUM, $egg_version_num)
1370    ])dnl
1371    
1372    dnl EGG_GNU_GETTEXT
1373    dnl
1374    AC_DEFUN(EGG_GNU_GETTEXT, [dnl
1375    AC_MSG_CHECKING(for avaible translations)
1376    ALL_LINGUAS=""
1377    cd po  
1378    for LOC in `ls *.po 2> /dev/null`; do
1379      ALL_LINGUAS="$ALL_LINGUAS `echo $LOC | awk 'BEGIN {FS = "."} {printf("%s", [$]1)}'`"
1380    done
1381    cd ..
1382    AC_MSG_RESULT($ALL_LINGUAS)
1383    
1384    AM_GNU_GETTEXT
1385    ])dnl
1386    
1387    #serial AM1
1388    
1389    dnl From Bruno Haible.
1390    
1391    AC_DEFUN([AM_LANGINFO_CODESET],
1392    [
1393      AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
1394        [AC_TRY_LINK([#include <langinfo.h>],
1395          [char* cs = nl_langinfo(CODESET);],
1396          am_cv_langinfo_codeset=yes,
1397          am_cv_langinfo_codeset=no)
1398        ])
1399      if test $am_cv_langinfo_codeset = yes; then
1400        AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
1401          [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
1402      fi
1403    ])
1404    # Macro to add for using GNU gettext.
1405    # Ulrich Drepper <drepper@cygnus.com>, 1995.
1406    #
1407    # This file can be copied and used freely without restrictions.  It can
1408    # be used in projects which are not available under the GNU General Public
1409    # License but which still want to provide support for the GNU gettext
1410    # functionality.
1411    # Please note that the actual code of GNU gettext is covered by the GNU
1412    # General Public License and is *not* in the public domain.
1413    
1414    # serial 10
1415    
1416    dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
1417    dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
1418    dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1419    dnl    depending on --{enable,disable}-{shared,static} and on the presence of
1420    dnl    AM-DISABLE-SHARED). Otherwise, a static library
1421    dnl    $(top_builddir)/intl/libintl.a will be created.
1422    dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1423    dnl    implementations (in libc or libintl) without the ngettext() function
1424    dnl    will be ignored.
1425    dnl LIBDIR is used to find the intl libraries.  If empty,
1426    dnl    the value `$(top_builddir)/intl/' is used.
1427    dnl
1428    dnl The result of the configuration is one of three cases:
1429    dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1430    dnl    and used.
1431    dnl    Catalog format: GNU --> install in $(datadir)
1432    dnl    Catalog extension: .mo after installation, .gmo in source tree
1433    dnl 2) GNU gettext has been found in the system's C library.
1434    dnl    Catalog format: GNU --> install in $(datadir)
1435    dnl    Catalog extension: .mo after installation, .gmo in source tree
1436    dnl 3) No internationalization, always use English msgid.
1437    dnl    Catalog format: none
1438    dnl    Catalog extension: none
1439    dnl The use of .gmo is historical (it was needed to avoid overwriting the
1440    dnl GNU format catalogs when building on a platform with an X/Open gettext),
1441    dnl but we keep it in order not to force irrelevant filename changes on the
1442    dnl maintainers.
1443    dnl
1444    AC_DEFUN([AM_WITH_NLS],
1445      [AC_MSG_CHECKING([whether NLS is requested])
1446        dnl Default is enabled NLS
1447        AC_ARG_ENABLE(nls,
1448          [  --disable-nls           do not use Native Language Support],
1449          USE_NLS=$enableval, USE_NLS=yes)
1450        AC_MSG_RESULT($USE_NLS)
1451        AC_SUBST(USE_NLS)
1452    
1453        BUILD_INCLUDED_LIBINTL=no
1454        USE_INCLUDED_LIBINTL=no
1455        INTLLIBS=
1456    
1457        dnl If we use NLS figure out what method
1458        if test "$USE_NLS" = "yes"; then
1459          AC_DEFINE(ENABLE_NLS, 1,
1460            [Define to 1 if translation of program messages to the user's native language
1461       is requested.])
1462          AC_MSG_CHECKING([whether included gettext is requested])
1463          AC_ARG_WITH(included-gettext,
1464            [  --with-included-gettext use the GNU gettext library included here],
1465            nls_cv_force_use_gnu_gettext=$withval,
1466            nls_cv_force_use_gnu_gettext=no)
1467          AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1468    
1469          nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1470          if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1471            dnl User does not insist on using GNU NLS library.  Figure out what
1472            dnl to use.  If GNU gettext is available we use this.  Else we have
1473            dnl to fall back to GNU NLS library.
1474        CATOBJEXT=NONE
1475    
1476            dnl Add a version number to the cache macros.
1477            define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
1478            define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
1479    
1480        AC_CHECK_HEADER(libintl.h,
1481          [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1482            [AC_TRY_LINK([#include <libintl.h>
1483    extern int _nl_msg_cat_cntr;],
1484               [bindtextdomain ("", "");
1485    return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
1486               gt_cv_func_gnugettext_libc=yes,
1487               gt_cv_func_gnugettext_libc=no)])
1488    
1489           if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1490             AC_CACHE_CHECK([for GNU gettext in libintl],
1491               gt_cv_func_gnugettext_libintl,
1492               [gt_save_LIBS="$LIBS"
1493            LIBS="$LIBS -lintl $LIBICONV"
1494            AC_TRY_LINK([#include <libintl.h>
1495    extern int _nl_msg_cat_cntr;],
1496              [bindtextdomain ("", "");
1497    return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
1498              gt_cv_func_gnugettext_libintl=yes,
1499              gt_cv_func_gnugettext_libintl=no)
1500            LIBS="$gt_save_LIBS"])
1501           fi
1502    
1503           dnl If an already present or preinstalled GNU gettext() is found,
1504           dnl use it.  But if this macro is used in GNU gettext, and GNU
1505           dnl gettext is already preinstalled in libintl, we update this
1506           dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
1507           if test "$gt_cv_func_gnugettext_libc" = "yes" \
1508              || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1509               && test "$PACKAGE" != gettext; }; then
1510             AC_DEFINE(HAVE_GETTEXT, 1,
1511                   [Define if the GNU gettext() function is already present or preinstalled.])
1512    
1513             if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1514               dnl If iconv() is in a separate libiconv library, then anyone
1515               dnl linking with libintl{.a,.so} also needs to link with
1516               dnl libiconv.
1517               INTLLIBS="-lintl $LIBICONV"
1518             fi
1519    
1520             gt_save_LIBS="$LIBS"
1521             LIBS="$LIBS $INTLLIBS"
1522             AC_CHECK_FUNCS(dcgettext)
1523             LIBS="$gt_save_LIBS"
1524    
1525             dnl Search for GNU msgfmt in the PATH.
1526             AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1527               [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
1528             AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1529    
1530             dnl Search for GNU xgettext in the PATH.
1531             AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1532               [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
1533    
1534             CATOBJEXT=.gmo
1535           fi
1536        ])
1537    
1538            if test "$CATOBJEXT" = "NONE"; then
1539          dnl GNU gettext is not found in the C library.
1540          dnl Fall back on GNU gettext library.
1541          nls_cv_use_gnu_gettext=yes
1542            fi
1543          fi
1544    
1545          if test "$nls_cv_use_gnu_gettext" = "yes"; then
1546            dnl Mark actions used to generate GNU NLS library.
1547            INTLOBJS="\$(GETTOBJS)"
1548            AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1549          [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
1550            AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1551            AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1552          [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
1553            AC_SUBST(MSGFMT)
1554        BUILD_INCLUDED_LIBINTL=yes
1555        USE_INCLUDED_LIBINTL=yes
1556            CATOBJEXT=.gmo
1557        INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
1558        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1559          fi
1560    
1561          dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1562          dnl Test whether we really found GNU msgfmt.
1563          if test "$GMSGFMT" != ":"; then
1564        dnl If it is no GNU msgfmt we define it as : so that the
1565        dnl Makefiles still can work.
1566        if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
1567          : ;
1568        else
1569          AC_MSG_RESULT(
1570            [found msgfmt program is not GNU msgfmt; ignore it])
1571          GMSGFMT=":"
1572        fi
1573          fi
1574    
1575          dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1576          dnl Test whether we really found GNU xgettext.
1577          if test "$XGETTEXT" != ":"; then
1578        dnl If it is no GNU xgettext we define it as : so that the
1579        dnl Makefiles still can work.
1580        if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
1581          : ;
1582        else
1583          AC_MSG_RESULT(
1584            [found xgettext program is not GNU xgettext; ignore it])
1585          XGETTEXT=":"
1586        fi
1587          fi
1588    
1589          dnl We need to process the po/ directory.
1590          POSUB=po
1591        fi
1592        AC_OUTPUT_COMMANDS(
1593         [for ac_file in $CONFIG_FILES; do
1594            # Support "outfile[:infile[:infile...]]"
1595            case "$ac_file" in
1596              *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1597            esac
1598            # PO directories have a Makefile.in generated from Makefile.in.in.
1599            case "$ac_file" in */Makefile.in)
1600              # Adjust a relative srcdir.
1601              ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1602              ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1603              ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1604              # In autoconf-2.13 it is called $ac_given_srcdir.
1605              # In autoconf-2.50 it is called $srcdir.
1606              test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1607              case "$ac_given_srcdir" in
1608                .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1609                /*) top_srcdir="$ac_given_srcdir" ;;
1610                *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1611              esac
1612              if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1613                rm -f "$ac_dir/POTFILES"
1614                test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1615                sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
1616                test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1617                sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1618              fi
1619              ;;
1620            esac
1621          done])
1622    
1623    
1624        dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1625        dnl to 'yes' because some of the testsuite requires it.
1626        if test "$PACKAGE" = gettext; then
1627          BUILD_INCLUDED_LIBINTL=yes
1628        fi
1629    
1630        dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1631        dnl because plural.y uses bison specific features. It requires at least
1632        dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1633        dnl compile.
1634        dnl bison is only needed for the maintainer (who touches plural.y). But in
1635        dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1636        dnl the rule in general Makefile. Now, some people carelessly touch the
1637        dnl files or have a broken "make" program, hence the plural.c rule will
1638        dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1639        dnl present or too old.
1640        AC_CHECK_PROGS([INTLBISON], [bison])
1641        if test -z "$INTLBISON"; then
1642          ac_verc_fail=yes
1643        else
1644          dnl Found it, now check the version.
1645          AC_MSG_CHECKING([version of bison])
1646    changequote(<<,>>)dnl
1647          ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1648          case $ac_prog_version in
1649            '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1650            1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1651    changequote([,])dnl
1652               ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1653            *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1654          esac
1655          AC_MSG_RESULT([$ac_prog_version])
1656        fi
1657        if test $ac_verc_fail = yes; then
1658          INTLBISON=:
1659        fi
1660    
1661        dnl These rules are solely for the distribution goal.  While doing this
1662        dnl we only have to keep exactly one list of the available catalogs
1663        dnl in configure.in.
1664        for lang in $ALL_LINGUAS; do
1665          GMOFILES="$GMOFILES $lang.gmo"
1666          POFILES="$POFILES $lang.po"
1667        done
1668    
1669        dnl Make all variables we use known to autoconf.
1670        AC_SUBST(BUILD_INCLUDED_LIBINTL)
1671        AC_SUBST(USE_INCLUDED_LIBINTL)
1672        AC_SUBST(CATALOGS)
1673        AC_SUBST(CATOBJEXT)
1674        AC_SUBST(GMOFILES)
1675        AC_SUBST(INTLLIBS)
1676        AC_SUBST(INTLOBJS)
1677        AC_SUBST(POFILES)
1678        AC_SUBST(POSUB)
1679    
1680        dnl For backward compatibility. Some configure.ins may be using this.
1681        nls_cv_header_intl=
1682        nls_cv_header_libgt=
1683    
1684        dnl For backward compatibility. Some Makefiles may be using this.
1685        DATADIRNAME=share
1686        AC_SUBST(DATADIRNAME)
1687    
1688        dnl For backward compatibility. Some Makefiles may be using this.
1689        INSTOBJEXT=.mo
1690        AC_SUBST(INSTOBJEXT)
1691    
1692        dnl For backward compatibility. Some Makefiles may be using this.
1693        GENCAT=gencat
1694        AC_SUBST(GENCAT)
1695      ])
1696    
1697    dnl Usage: Just like AM_WITH_NLS, which see.
1698    AC_DEFUN([AM_GNU_GETTEXT],
1699      [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1700       AC_REQUIRE([AC_PROG_CC])dnl
1701       AC_REQUIRE([AC_CANONICAL_HOST])dnl
1702       AC_REQUIRE([AC_PROG_RANLIB])dnl
1703       AC_REQUIRE([AC_ISC_POSIX])dnl
1704       AC_REQUIRE([AC_HEADER_STDC])dnl
1705       AC_REQUIRE([AC_C_CONST])dnl
1706       AC_REQUIRE([AC_C_INLINE])dnl
1707       AC_REQUIRE([AC_TYPE_OFF_T])dnl
1708       AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1709       AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1710       AC_REQUIRE([AC_FUNC_MMAP])dnl
1711       AC_REQUIRE([jm_GLIBC21])dnl
1712    
1713       AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1714    stdlib.h string.h unistd.h sys/param.h])
1715       AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
1716    getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
1717    strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1718    
1719       AM_ICONV
1720       AM_LANGINFO_CODESET
1721       AM_LC_MESSAGES
1722       AM_WITH_NLS([$1],[$2],[$3])
1723    
1724       if test "x$CATOBJEXT" != "x"; then
1725         if test "x$ALL_LINGUAS" = "x"; then
1726           LINGUAS=
1727         else
1728           AC_MSG_CHECKING(for catalogs to be installed)
1729           NEW_LINGUAS=
1730           for presentlang in $ALL_LINGUAS; do
1731             useit=no
1732             for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
1733               # Use the presentlang catalog if desiredlang is
1734               #   a. equal to presentlang, or
1735               #   b. a variant of presentlang (because in this case,
1736               #      presentlang can be used as a fallback for messages
1737               #      which are not translated in the desiredlang catalog).
1738               case "$desiredlang" in
1739                 "$presentlang"*) useit=yes;;
1740               esac
1741             done
1742             if test $useit = yes; then
1743               NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1744             fi
1745           done
1746           LINGUAS=$NEW_LINGUAS
1747           AC_MSG_RESULT($LINGUAS)
1748         fi
1749    
1750         dnl Construct list of names of catalog files to be constructed.
1751         if test -n "$LINGUAS"; then
1752           for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1753         fi
1754       fi
1755    
1756       dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1757       dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1758       dnl Try to locate is.
1759       MKINSTALLDIRS=
1760       if test -n "$ac_aux_dir"; then
1761         MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1762       fi
1763       if test -z "$MKINSTALLDIRS"; then
1764         MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1765       fi
1766       AC_SUBST(MKINSTALLDIRS)
1767    
1768       dnl Enable libtool support if the surrounding package wishes it.
1769       INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
1770       AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1771      ])
1772    #serial 2
1773    
1774    # Test for the GNU C Library, version 2.1 or newer.
1775    # From Bruno Haible.
1776    
1777    AC_DEFUN([jm_GLIBC21],
1778      [
1779        AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
1780          ac_cv_gnu_library_2_1,
1781          [AC_EGREP_CPP([Lucky GNU user],
1782        [
1783    #include <features.h>
1784    #ifdef __GNU_LIBRARY__
1785     #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
1786      Lucky GNU user
1787     #endif
1788    #endif
1789        ],
1790        ac_cv_gnu_library_2_1=yes,
1791        ac_cv_gnu_library_2_1=no)
1792          ]
1793        )
1794        AC_SUBST(GLIBC21)
1795        GLIBC21="$ac_cv_gnu_library_2_1"
1796      ]
1797    )
1798    #serial AM2
1799    
1800    dnl From Bruno Haible.
1801    
1802    AC_DEFUN([AM_ICONV],
1803    [
1804      dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
1805      dnl those with the standalone portable GNU libiconv installed).
1806    
1807      AC_ARG_WITH([libiconv-prefix],
1808    [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
1809        for dir in `echo "$withval" | tr : ' '`; do
1810          if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
1811          if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
1812        done
1813       ])
1814    
1815      AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
1816        am_cv_func_iconv="no, consider installing GNU libiconv"
1817        am_cv_lib_iconv=no
1818        AC_TRY_LINK([#include <stdlib.h>
1819    #include <iconv.h>],
1820          [iconv_t cd = iconv_open("","");
1821           iconv(cd,NULL,NULL,NULL,NULL);
1822           iconv_close(cd);],
1823          am_cv_func_iconv=yes)
1824        if test "$am_cv_func_iconv" != yes; then
1825          am_save_LIBS="$LIBS"
1826          LIBS="$LIBS -liconv"
1827          AC_TRY_LINK([#include <stdlib.h>
1828    #include <iconv.h>],
1829            [iconv_t cd = iconv_open("","");
1830             iconv(cd,NULL,NULL,NULL,NULL);
1831             iconv_close(cd);],
1832            am_cv_lib_iconv=yes
1833            am_cv_func_iconv=yes)
1834          LIBS="$am_save_LIBS"
1835        fi
1836      ])
1837      if test "$am_cv_func_iconv" = yes; then
1838        AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
1839        AC_MSG_CHECKING([for iconv declaration])
1840        AC_CACHE_VAL(am_cv_proto_iconv, [
1841          AC_TRY_COMPILE([
1842    #include <stdlib.h>
1843    #include <iconv.h>
1844    extern
1845    #ifdef __cplusplus
1846    "C"
1847    #endif
1848    #if defined(__STDC__) || defined(__cplusplus)
1849    size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
1850    #else
1851    size_t iconv();
1852    #endif
1853    ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
1854          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);"])
1855        am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1856        AC_MSG_RESULT([$]{ac_t:-
1857             }[$]am_cv_proto_iconv)
1858        AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
1859          [Define as const if the declaration of iconv() needs const.])
1860      fi
1861      LIBICONV=
1862      if test "$am_cv_lib_iconv" = yes; then
1863        LIBICONV="-liconv"
1864      fi
1865      AC_SUBST(LIBICONV)
1866    ])
1867    #serial 1
1868    # This test replaces the one in autoconf.
1869    # Currently this macro should have the same name as the autoconf macro
1870    # because gettext's gettext.m4 (distributed in the automake package)
1871    # still uses it.  Otherwise, the use in gettext.m4 makes autoheader
1872    # give these diagnostics:
1873    #   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1874    #   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1875    
1876    undefine([AC_ISC_POSIX])
1877    
1878    AC_DEFUN([AC_ISC_POSIX],
1879      [
1880        dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1881        AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1882      ]
1883    )
1884    # Check whether LC_MESSAGES is available in <locale.h>.
1885    # Ulrich Drepper <drepper@cygnus.com>, 1995.
1886    #
1887    # This file can be copied and used freely without restrictions.  It can
1888    # be used in projects which are not available under the GNU General Public
1889    # License but which still want to provide support for the GNU gettext
1890    # functionality.
1891    # Please note that the actual code of GNU gettext is covered by the GNU
1892    # General Public License and is *not* in the public domain.
1893    
1894    # serial 2
1895    
1896    AC_DEFUN([AM_LC_MESSAGES],
1897      [if test $ac_cv_header_locale_h = yes; then
1898        AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1899          [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1900           am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1901        if test $am_cv_val_LC_MESSAGES = yes; then
1902          AC_DEFINE(HAVE_LC_MESSAGES, 1,
1903            [Define if your <locale.h> file defines LC_MESSAGES.])
1904        fi
1905      fi])
1906    # Search path for a program which passes the given test.
1907    # Ulrich Drepper <drepper@cygnus.com>, 1996.
1908    #
1909    # This file can be copied and used freely without restrictions.  It can
1910    # be used in projects which are not available under the GNU General Public
1911    # License but which still want to provide support for the GNU gettext
1912    # functionality.
1913    # Please note that the actual code of GNU gettext is covered by the GNU
1914    # General Public License and is *not* in the public domain.
1915    
1916    # serial 2
1917    
1918    dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1919    dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1920    AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1921    [# Extract the first word of "$2", so it can be a program name with args.
1922    set dummy $2; ac_word=[$]2
1923    AC_MSG_CHECKING([for $ac_word])
1924    AC_CACHE_VAL(ac_cv_path_$1,
1925    [case "[$]$1" in
1926      /*)
1927      ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1928      ;;
1929      *)
1930      IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1931      for ac_dir in ifelse([$5], , $PATH, [$5]); do
1932        test -z "$ac_dir" && ac_dir=.
1933        if test -f $ac_dir/$ac_word; then
1934          if [$3]; then
1935        ac_cv_path_$1="$ac_dir/$ac_word"
1936        break
1937          fi
1938        fi
1939      done
1940      IFS="$ac_save_ifs"
1941    dnl If no 4th arg is given, leave the cache variable unset,
1942    dnl so AC_PATH_PROGS will keep looking.
1943    ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1944    ])dnl
1945      ;;
1946    esac])dnl
1947    $1="$ac_cv_path_$1"
1948    if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1949      AC_MSG_RESULT([$]$1)
1950    else
1951      AC_MSG_RESULT(no)
1952    fi
1953    AC_SUBST($1)dnl
1954    ])

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23