~ubuntu-branches/ubuntu/lucid/gnome-doc-utils/lucid

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-19 08:34:21 UTC
  • mto: (2.1.1 etch) (1.1.18 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051219083421-k72rkh3n6vox1c0t
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1069
1069
        [AC_TRY_LINK([
1070
1070
#include <libintl.h>
1071
1071
],
1072
 
         [return (int) ngettext ("","", 1)],
 
1072
         [return !ngettext ("","", 1)],
1073
1073
          gt_cv_func_ngettext_libc=yes,
1074
1074
          gt_cv_func_ngettext_libc=no)
1075
1075
        ])
1079
1079
                [AC_TRY_LINK([
1080
1080
#include <libintl.h>
1081
1081
],
1082
 
                  [return (int) dgettext ("","")],
 
1082
                  [return !dgettext ("","")],
1083
1083
                  gt_cv_func_dgettext_libc=yes,
1084
1084
                  gt_cv_func_dgettext_libc=no)
1085
1085
                ])
1345
1345
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1346
1346
])dnl
1347
1347
 
1348
 
dnl GNOME_DOC_INIT
 
1348
dnl GNOME_DOC_INIT([MINIMUM-VERSION])
1349
1349
 
1350
1350
AC_DEFUN([GNOME_DOC_INIT],
1351
1351
[
 
1352
dnl Only apply the version check if we're not configuring ourselves!
 
1353
if test "x$PACKAGE" != "xgnome-doc-utils"; then
 
1354
  GDU_REQUIRED_VERSION=0.3.2
 
1355
  if test -n "$1"; then
 
1356
    GDU_REQUIRED_VERSION=$1
 
1357
  fi
 
1358
 
 
1359
  PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
 
1360
fi
 
1361
 
1352
1362
AC_ARG_WITH([help-dir],
1353
1363
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
1354
1364
  [with_help_dir='${datadir}/gnome/help'])
1367
1377
DOC_USER_FORMATS="$with_help_formats"
1368
1378
AC_SUBST(DOC_USER_FORMATS)
1369
1379
 
 
1380
AC_ARG_ENABLE([scrollkeeper],
 
1381
        [AC_HELP_STRING([--disable-scrollkeeper],
 
1382
                        [do not make updates to the scrollkeeper database])],,
 
1383
        enable_scrollkeeper=yes)
 
1384
AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
 
1385
 
1370
1386
AC_OUTPUT_COMMANDS([
1371
 
gdumk=`pkg-config --variable prefix gnome-doc-utils`/share/gnome-doc-utils/gnome-doc-utils.make
1372
 
if ! test -f gnome-doc-utils.m4; then
 
1387
gdumk=`pkg-config --variable datadir gnome-doc-utils`/gnome-doc-utils/gnome-doc-utils.make
 
1388
if test -f $srcdir/gnome-doc-utils.m4; then
 
1389
  if ! cmp -s $srcdir/gnome-doc-utils.make gnome-doc-utils.make; then
 
1390
    cp $srcdir/gnome-doc-utils.make gnome-doc-utils.make
 
1391
  fi
 
1392
else
1373
1393
  if ! cmp -s $gdumk gnome-doc-utils.make; then
1374
 
    cp $gdumk .
 
1394
    cp $gdumk gnome-doc-utils.make
1375
1395
  fi
1376
1396
fi
1377
 
if ! grep -q 'gnome-doc-utils\.make' Makefile.am; then
 
1397
if ! grep 'gnome-doc-utils\.make' $ac_top_srcdir/Makefile.am >/dev/null; then
1378
1398
  echo gnome-doc-utils.make should be added to EXTRA_DIST in Makefile.am
1379
1399
fi
1380
1400
])
1381
1401
])
1382
1402
 
1383
1403
 
 
1404
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
 
1405
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
 
1406
dnl also defines GSTUFF_PKG_ERRORS on error
 
1407
AC_DEFUN([PKG_CHECK_MODULES], [
 
1408
  succeeded=no
 
1409
 
 
1410
  if test -z "$PKG_CONFIG"; then
 
1411
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
1412
  fi
 
1413
 
 
1414
  if test "$PKG_CONFIG" = "no" ; then
 
1415
     echo "*** The pkg-config script could not be found. Make sure it is"
 
1416
     echo "*** in your path, or set the PKG_CONFIG environment variable"
 
1417
     echo "*** to the full path to pkg-config."
 
1418
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
 
1419
  else
 
1420
     PKG_CONFIG_MIN_VERSION=0.9.0
 
1421
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
 
1422
        AC_MSG_CHECKING(for $2)
 
1423
 
 
1424
        if $PKG_CONFIG --exists "$2" ; then
 
1425
            AC_MSG_RESULT(yes)
 
1426
            succeeded=yes
 
1427
 
 
1428
            AC_MSG_CHECKING($1_CFLAGS)
 
1429
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
 
1430
            AC_MSG_RESULT($$1_CFLAGS)
 
1431
 
 
1432
            AC_MSG_CHECKING($1_LIBS)
 
1433
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
 
1434
            AC_MSG_RESULT($$1_LIBS)
 
1435
        else
 
1436
            $1_CFLAGS=""
 
1437
            $1_LIBS=""
 
1438
            ## If we have a custom action on failure, don't print errors, but 
 
1439
            ## do set a variable so people can do so.
 
1440
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1441
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
 
1442
        fi
 
1443
 
 
1444
        AC_SUBST($1_CFLAGS)
 
1445
        AC_SUBST($1_LIBS)
 
1446
     else
 
1447
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
 
1448
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
 
1449
     fi
 
1450
  fi
 
1451
 
 
1452
  if test $succeeded = yes; then
 
1453
     ifelse([$3], , :, [$3])
 
1454
  else
 
1455
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
 
1456
  fi
 
1457
])
 
1458
 
 
1459
 
 
1460
 
 
1461
 
1384
1462
# Copyright 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
1385
1463
 
1386
1464
# This program is free software; you can redistribute it and/or modify
1567
1645
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1568
1646
   (exit $ac_status); }])
1569
1647
 
1570
 
 
1571
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1572
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1573
 
dnl also defines GSTUFF_PKG_ERRORS on error
1574
 
AC_DEFUN(PKG_CHECK_MODULES, [
1575
 
  succeeded=no
1576
 
 
1577
 
  if test -z "$PKG_CONFIG"; then
1578
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1579
 
  fi
1580
 
 
1581
 
  if test "$PKG_CONFIG" = "no" ; then
1582
 
     echo "*** The pkg-config script could not be found. Make sure it is"
1583
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
1584
 
     echo "*** to the full path to pkg-config."
1585
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1586
 
  else
1587
 
     PKG_CONFIG_MIN_VERSION=0.9.0
1588
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1589
 
        AC_MSG_CHECKING(for $2)
1590
 
 
1591
 
        if $PKG_CONFIG --exists "$2" ; then
1592
 
            AC_MSG_RESULT(yes)
1593
 
            succeeded=yes
1594
 
 
1595
 
            AC_MSG_CHECKING($1_CFLAGS)
1596
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1597
 
            AC_MSG_RESULT($$1_CFLAGS)
1598
 
 
1599
 
            AC_MSG_CHECKING($1_LIBS)
1600
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
1601
 
            AC_MSG_RESULT($$1_LIBS)
1602
 
        else
1603
 
            $1_CFLAGS=""
1604
 
            $1_LIBS=""
1605
 
            ## If we have a custom action on failure, don't print errors, but 
1606
 
            ## do set a variable so people can do so.
1607
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1608
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
1609
 
        fi
1610
 
 
1611
 
        AC_SUBST($1_CFLAGS)
1612
 
        AC_SUBST($1_LIBS)
1613
 
     else
1614
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
1615
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
1616
 
     fi
1617
 
  fi
1618
 
 
1619
 
  if test $succeeded = yes; then
1620
 
     ifelse([$3], , :, [$3])
1621
 
  else
1622
 
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
1623
 
  fi
1624
 
])
1625
 
 
1626
 
 
1627