~ubuntu-branches/ubuntu/lucid/gnome-chemistry-utils/lucid-security

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2005-09-14 14:43:47 UTC
  • Revision ID: james.westby@ubuntu.com-20050914144347-fbiixnmddp93i6bn
Tags: 0.4.1-0dl2ubuntu2
rebuild to catch new libopenbabel0c2 dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
6933
6933
 
6934
6934
ifdef([AC_DIVERSION_ICMDS],[
6935
6935
  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
6936
 
      changequote(,)
6937
 
      mv -f po/POTFILES po/POTFILES.tmp
6938
 
      sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
 
6936
     [mv -f po/POTFILES po/POTFILES.tmp
 
6937
      sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
6939
6938
      rm -f po/POTFILES.tmp
6940
 
      changequote([,])
 
6939
     ]dnl
6941
6940
  AC_DIVERT_POP()
6942
6941
],[
6943
6942
  ifdef([AC_CONFIG_COMMANDS_PRE],[
6944
6943
    AC_CONFIG_COMMANDS_PRE([
6945
 
        changequote(,)
6946
 
        mv -f po/POTFILES po/POTFILES.tmp
6947
 
        sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
 
6944
       [mv -f po/POTFILES po/POTFILES.tmp
 
6945
        sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
6948
6946
        rm -f po/POTFILES.tmp
6949
 
        changequote([,])
 
6947
       ]dnl
6950
6948
    ])
6951
6949
  ])
6952
 
 
6953
 
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6954
 
  # Keeping the `.' argument allows $(mkdir_p) to be used without
6955
 
  # argument.  Indeed, we sometimes output rules like
6956
 
  #   $(mkdir_p) $(somedir)
6957
 
  # where $(somedir) is conditionally defined.
6958
 
  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
6959
 
  # expensive solution, as it forces Make to start a sub-shell.)
6960
 
  mkdir_p='mkdir -p -- .'
6961
 
else
6962
 
  # On NextStep and OpenStep, the `mkdir' command does not
6963
 
  # recognize any option.  It will interpret all options as
6964
 
  # directories to create, and then abort because `.' already
6965
 
  # exists.
6966
 
  for d in ./-p ./--version;
6967
 
  do
6968
 
    test -d $d && rmdir $d
6969
 
  done
6970
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6971
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
6972
 
    mkdir_p='$(mkinstalldirs)'
6973
 
  else
6974
 
    mkdir_p='$(install_sh) -d'
6975
 
  fi
6976
 
fi
6977
 
AC_SUBST([mkdir_p])
6978
6950
])
6979
6951
 
6980
6952
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7152
7124
        [AC_TRY_LINK([
7153
7125
#include <libintl.h>
7154
7126
],
7155
 
         [return (int) ngettext ("","", 1)],
 
7127
         [return !ngettext ("","", 1)],
7156
7128
          gt_cv_func_ngettext_libc=yes,
7157
7129
          gt_cv_func_ngettext_libc=no)
7158
7130
        ])
7162
7134
                [AC_TRY_LINK([
7163
7135
#include <libintl.h>
7164
7136
],
7165
 
                  [return (int) dgettext ("","")],
 
7137
                  [return !dgettext ("","")],
7166
7138
                  gt_cv_func_dgettext_libc=yes,
7167
7139
                  gt_cv_func_dgettext_libc=no)
7168
7140
                ])
7428
7400
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7429
7401
])dnl
7430
7402
 
7431
 
 
7432
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
7433
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
7434
 
dnl also defines GSTUFF_PKG_ERRORS on error
7435
 
AC_DEFUN(PKG_CHECK_MODULES, [
7436
 
  succeeded=no
7437
 
 
7438
 
  if test -z "$PKG_CONFIG"; then
7439
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
7440
 
  fi
7441
 
 
7442
 
  if test "$PKG_CONFIG" = "no" ; then
7443
 
     echo "*** The pkg-config script could not be found. Make sure it is"
7444
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
7445
 
     echo "*** to the full path to pkg-config."
7446
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
7447
 
  else
7448
 
     PKG_CONFIG_MIN_VERSION=0.9.0
7449
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7450
 
        AC_MSG_CHECKING(for $2)
7451
 
 
7452
 
        if $PKG_CONFIG --exists "$2" ; then
7453
 
            AC_MSG_RESULT(yes)
7454
 
            succeeded=yes
7455
 
 
7456
 
            AC_MSG_CHECKING($1_CFLAGS)
7457
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
7458
 
            AC_MSG_RESULT($$1_CFLAGS)
7459
 
 
7460
 
            AC_MSG_CHECKING($1_LIBS)
7461
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
7462
 
            AC_MSG_RESULT($$1_LIBS)
7463
 
        else
7464
 
            $1_CFLAGS=""
7465
 
            $1_LIBS=""
7466
 
            ## If we have a custom action on failure, don't print errors, but 
7467
 
            ## do set a variable so people can do so.
7468
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7469
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
7470
 
        fi
7471
 
 
7472
 
        AC_SUBST($1_CFLAGS)
7473
 
        AC_SUBST($1_LIBS)
7474
 
     else
7475
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
7476
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
7477
 
     fi
7478
 
  fi
7479
 
 
7480
 
  if test $succeeded = yes; then
7481
 
     ifelse([$3], , :, [$3])
7482
 
  else
7483
 
     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])
7484
 
  fi
7485
 
])
7486
 
 
7487
 
 
 
7403
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
7404
 
7405
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
7406
#
 
7407
# This program is free software; you can redistribute it and/or modify
 
7408
# it under the terms of the GNU General Public License as published by
 
7409
# the Free Software Foundation; either version 2 of the License, or
 
7410
# (at your option) any later version.
 
7411
#
 
7412
# This program is distributed in the hope that it will be useful, but
 
7413
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
7414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
7415
# General Public License for more details.
 
7416
#
 
7417
# You should have received a copy of the GNU General Public License
 
7418
# along with this program; if not, write to the Free Software
 
7419
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
7420
#
 
7421
# As a special exception to the GNU General Public License, if you
 
7422
# distribute this file as part of a program that contains a
 
7423
# configuration script generated by Autoconf, you may include it under
 
7424
# the same distribution terms that you use for the rest of that program.
 
7425
 
 
7426
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
7427
# ----------------------------------
 
7428
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
7429
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
7430
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
7431
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
7432
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
7433
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
7434
fi
 
7435
if test -n "$PKG_CONFIG"; then
 
7436
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
7437
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
7438
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
7439
                AC_MSG_RESULT([yes])
 
7440
        else
 
7441
                AC_MSG_RESULT([no])
 
7442
                PKG_CONFIG=""
 
7443
        fi
 
7444
                
 
7445
fi[]dnl
 
7446
])# PKG_PROG_PKG_CONFIG
 
7447
 
 
7448
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
7449
#
 
7450
# Check to see whether a particular set of modules exists.  Similar
 
7451
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
7452
#
 
7453
#
 
7454
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
7455
# this or PKG_CHECK_MODULES is called, or make sure to call
 
7456
# PKG_CHECK_EXISTS manually
 
7457
# --------------------------------------------------------------
 
7458
AC_DEFUN([PKG_CHECK_EXISTS],
 
7459
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
7460
if test -n "$PKG_CONFIG" && \
 
7461
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
7462
  m4_ifval([$2], [$2], [:])
 
7463
m4_ifvaln([$3], [else
 
7464
  $3])dnl
 
7465
fi])
 
7466
 
 
7467
 
 
7468
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
7469
# ---------------------------------------------
 
7470
m4_define([_PKG_CONFIG],
 
7471
[if test -n "$PKG_CONFIG"; then
 
7472
        PKG_CHECK_EXISTS([$3],
 
7473
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
7474
                         [pkg_failed=yes])
 
7475
else
 
7476
        pkg_failed=untried
 
7477
fi[]dnl
 
7478
])# _PKG_CONFIG
 
7479
 
 
7480
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
7481
# [ACTION-IF-NOT-FOUND])
 
7482
#
 
7483
#
 
7484
# Note that if there is a possibility the first call to
 
7485
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
7486
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
7487
#
 
7488
#
 
7489
# --------------------------------------------------------------
 
7490
AC_DEFUN([PKG_CHECK_MODULES],
 
7491
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
7492
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
7493
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
7494
 
 
7495
pkg_failed=no
 
7496
AC_MSG_CHECKING([for $1])
 
7497
 
 
7498
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
7499
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
7500
 
 
7501
if test $pkg_failed = yes; then
 
7502
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
7503
        # Put the nasty error message in config.log where it belongs
 
7504
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
7505
 
 
7506
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
7507
[Package requirements ($2) were not met.
 
7508
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
7509
installed software in a non-standard prefix.
 
7510
 
 
7511
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
7512
to avoid the need to call pkg-config.  See the pkg-config man page for
 
7513
more details.])],
 
7514
                [$4])
 
7515
elif test $pkg_failed = untried; then
 
7516
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
7517
[The pkg-config script could not be found or is too old.  Make sure it
 
7518
is in your PATH or set the PKG_CONFIG environment variable to the full
 
7519
path to pkg-config.
 
7520
 
 
7521
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
7522
to avoid the need to call pkg-config.  See the pkg-config man page for
 
7523
more details.
 
7524
 
 
7525
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
7526
                [$4])
 
7527
else
 
7528
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
7529
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
7530
        AC_MSG_RESULT([yes])
 
7531
        ifelse([$3], , :, [$3])
 
7532
fi[]dnl
 
7533
])# PKG_CHECK_MODULES
7488
7534