7016
7338
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7017
7339
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7019
dnl Available from the GNU Autoconf Macro Archive at:
7020
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_pkg_swig.html
7022
AC_DEFUN([AC_PROG_SWIG],[
7023
AC_PATH_PROG([SWIG],[swig])
7024
if test -z "$SWIG" ; then
7025
AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
7026
SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
7027
elif test -n "$1" ; then
7028
AC_MSG_CHECKING([for SWIG version])
7029
[swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
7030
AC_MSG_RESULT([$swig_version])
7031
if test -n "$swig_version" ; then
7032
# Calculate the required version number components
7034
[required_major=`echo $required | sed 's/[^0-9].*//'`]
7035
if test -z "$required_major" ; then
7038
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
7039
[required_minor=`echo $required | sed 's/[^0-9].*//'`]
7040
if test -z "$required_minor" ; then
7043
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
7044
[required_patch=`echo $required | sed 's/[^0-9].*//'`]
7045
if test -z "$required_patch" ; then
7048
# Calculate the available version number components
7049
[available=$swig_version]
7050
[available_major=`echo $available | sed 's/[^0-9].*//'`]
7051
if test -z "$available_major" ; then
7054
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
7055
[available_minor=`echo $available | sed 's/[^0-9].*//'`]
7056
if test -z "$available_minor" ; then
7059
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
7060
[available_patch=`echo $available | sed 's/[^0-9].*//'`]
7061
if test -z "$available_patch" ; then
7064
if test $available_major -ne $required_major \
7065
-o $available_minor -ne $required_minor \
7066
-o $available_patch -lt $required_patch ; then
7067
AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
7068
SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
7070
AC_MSG_NOTICE([SWIG executable is '$SWIG'])
7071
SWIG_LIB=`$SWIG -swiglib`
7072
AC_MSG_NOTICE([SWIG runtime library directory is '$SWIG_LIB'])
7075
AC_MSG_WARN([cannot determine SWIG version])
7076
SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false'
7079
AC_SUBST([SWIG_LIB])
7084
# Enable SWIG C++ support. This affects all invocations of $(SWIG).
7085
AC_DEFUN([SWIG_ENABLE_CXX],[
7086
AC_REQUIRE([AC_PROG_SWIG])
7087
AC_REQUIRE([AC_PROG_CXX])
7091
# SWIG_MULTI_MODULE_SUPPORT()
7093
# Enable support for multiple modules. This effects all invocations
7094
# of $(SWIG). You have to link all generated modules against the
7095
# appropriate SWIG runtime library. If you want to build Python
7096
# modules for example, use the SWIG_PYTHON() macro and link the
7097
# modules against $(SWIG_PYTHON_LIBS).
7098
AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[
7099
AC_REQUIRE([AC_PROG_SWIG])
7103
# SWIG_PYTHON([use-shadow-classes = {no, yes}])
7105
# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
7106
# $(SWIG_PYTHON_LIBS) and $(SWIG_PYTHON_OPT) output variables.
7107
# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
7108
# code for Python. Shadow classes are enabled unless the value of the
7109
# optional first argument is exactly 'no'. If you need multi module
7110
# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use
7111
# $(SWIG_PYTHON_LIBS) to link against the appropriate library. It
7112
# contains the SWIG Python runtime library that is needed by the type
7113
# check system for example.
7114
AC_DEFUN([SWIG_PYTHON],[
7115
AC_REQUIRE([AC_PROG_SWIG])
7116
AC_REQUIRE([AC_PYTHON_DEVEL])
7117
test "x$1" != "xno" || swig_shadow=" -noproxy"
7118
AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow])
7119
AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
7120
AC_SUBST([SWIG_PYTHON_LIBS],["-L$SWIG_LIB -lswigpy"])
7124
dnl @synopsis AC_LIB_WAD
7126
dnl This macro searches for installed WAD library.
7128
AC_DEFUN([AC_LIB_WAD],
7130
AC_REQUIRE([AC_PYTHON_DEVEL])
7132
AC_HELP_STRING([--enable-wad], [enable wad module]),
7134
case "${enableval}" in
7136
*) if test "x${enableval}" = xyes;
7143
if test -n "$check_wad";
7145
AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS)
7150
dnl Available from the GNU Autoconf Macro Archive at:
7151
dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_python_devel.html
7153
AC_DEFUN([AC_PYTHON_DEVEL],[
7155
# should allow for checking of python version here...
7157
AC_REQUIRE([AM_PATH_PYTHON])
7159
# Check for Python include path
7160
AC_MSG_CHECKING([for Python include path])
7161
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
7162
for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
7163
python_path=`find $i -type f -name Python.h -print | sed "1q"`
7164
if test -n "$python_path" ; then
7168
python_path=`echo $python_path | sed "s,/Python.h$,,"`
7169
AC_MSG_RESULT([$python_path])
7170
if test -z "$python_path" ; then
7171
AC_MSG_ERROR([cannot find Python include path])
7173
AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
7175
# Check for Python library path
7176
AC_MSG_CHECKING([for Python library path])
7177
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
7178
for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
7179
python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
7180
if test -n "$python_path" ; then
7184
python_path=`echo $python_path | sed "s,/libpython.*$,,"`
7185
AC_MSG_RESULT([$python_path])
7186
if test -z "$python_path" ; then
7187
AC_MSG_ERROR([cannot find Python library path])
7189
AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
7191
python_site=`echo $python_path | sed "s/config/site-packages/"`
7192
AC_SUBST([PYTHON_SITE_PKG],[$python_site])
7194
# libraries which must be linked in when embedding
7196
AC_MSG_CHECKING(python extra libraries)
7197
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
7198
conf = distutils.sysconfig.get_config_var; \
7199
print conf('LOCALMODLIBS')+' '+conf('LIBS')"
7200
AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
7201
AC_SUBST(PYTHON_EXTRA_LIBS)
7204
dnl $Id: acinclude.m4,v 1.7 2004/04/04 20:51:58 rlaboiss Exp $ --*-Autoconf-*--
7206
dnl Local autoconf extensions. These are based on the autoconf builtin
7207
dnl macros, and you can do what you want with them.
7210
dnl IFS, University of Texas at Austin
7213
dnl Copyright (C) 2003, 2004 Rafael Laboissiere
7214
dnl Copyright (C) 2004 Alan W. Irwin
7216
dnl This file is part of PLplot.
7218
dnl PLplot is free software; you can redistribute it and/or modify
7219
dnl it under the terms of the GNU General Library Public License as published
7220
dnl by the Free Software Foundation; either version 2 of the License, or
7221
dnl (at your option) any later version.
7223
dnl PLplot is distributed in the hope that it will be useful,
7224
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
7225
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7226
dnl GNU Library General Public License for more details.
7228
dnl You should have received a copy of the GNU Library General Public License
7229
dnl along with PLplot; if not, write to the Free Software
7230
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7232
dnl ------------------------------------------------------------------------
7233
dnl Include macro which knows about the cf/ directory
7235
define([PL_INCLUDE], [builtin([include], [cf/$1])])
7237
dnl ------------------------------------------------------------------------
7238
dnl This quicky is good during development, e.g. PL_IGNORE([ ... ]) to
7239
dnl ignore everything inside the brackets.
7241
AC_DEFUN([PL_IGNORE],)
7243
dnl ------------------------------------------------------------------------
7244
dnl PL_ARG_ENABLE(enable-option, help-string, default-value)
7246
AC_DEFUN([PL_ARG_ENABLE],[
7248
AS_HELP_STRING([--enable-$1], [$2 @<:@default=$3@:>@]),
7249
[enable_[]translit($1, [-], [_])=$enableval],
7250
[enable_[]translit($1, [-], [_])=$3])])
7251
dnl ------------------------------------------------------------------------
7252
dnl PL_ARG_WITH(enable-option, help-string, default-value)
7254
AC_DEFUN([PL_ARG_WITH],[
7256
AS_HELP_STRING([--with-$1], [$2 @<:@default=$3@:>@]),
7257
[with_[]translit($1, [-], [_])=$withval],
7258
[with_[]translit($1, [-], [_])=$3])])
7259
dnl ------------------------------------------------------------------------
7260
dnl Add device/driver information to help string and *_DRIVERS list
7262
dnl PL_ADD_DRIVER(device, driver, enable_default)
7264
define([PL_ARG_ENABLE_DRIVER],
7265
[PL_ARG_ENABLE($1, [enable $1 device driver], $3)])
7267
dnl ------------------------------------------------------------------------
7268
dnl Recursive macro to set up all driver help entries
7270
dnl PL_DRIVERS(device:driver:enable_default, ...)
7272
define(PL_ARG_ENABLE_DRIVERS,[ifelse($1,,,dnl
7273
[PL_ARG_ENABLE_DRIVER(patsubst($1, [:.*], []),dnl
7274
patsubst(patsubst($1, [^[^:]+:], []), [:.*], []),dnl
7275
patsubst($1, [^.*:], []))dnl
7276
PL_ARG_ENABLE_DRIVERS(builtin([shift],$*))])])
7278
dnl ------------------------------------------------------------------------
7279
define([PL_ADD_DRIVER], [
7280
PL_ARG_ENABLE($1, [enable $1 device driver], $3)
7281
if test "$enable_$1" = yes -o "$enable_$1 $enable_drivers" = " yes" ; then
7285
if test "$enable_dyndrivers" = yes ; then
7287
pl_drivers_list="$DYNAMIC_DRIVERS"
7290
pl_drivers_list="$STATIC_DRIVERS"
7294
for pl_drv in $pl_drivers_list ; do
7295
if test "$pl_drv" = "$2.$pl_suffix" ; then
7301
if test $found = 0; then
7302
if test -z "$pl_drivers_list" ; then
7303
pl_drivers_list="$2.$pl_suffix"
7305
pl_drivers_list="$pl_drivers_list $2.$pl_suffix"
7310
if test "$enable_dyndrivers" = yes ; then
7311
DYNAMIC_DRIVERS="$pl_drivers_list"
7313
STATIC_DRIVERS="$pl_drivers_list"
7316
AC_DEFINE(PLD_$1, [], [Define if $1 driver is present])
7317
if test -z "$pl_drivers_list" ; then
7320
DEVICES="$DEVICES $1"
7330
dnl ------------------------------------------------------------------------
7331
dnl Recursive macro to set up all driver help entries
7333
dnl PL_DRIVERS(device:driver:enable_default, ...)
7335
define(PL_ADD_DRIVERS,[ifelse($1,,,dnl
7336
[PL_ADD_DRIVER(patsubst($1, [:.*], []),dnl
7337
patsubst(patsubst($1, [^[^:]+:], []), [:.*], []),dnl
7338
patsubst($1, [^.*:], []))dnl
7339
PL_ADD_DRIVERS(builtin([shift],$*))])])
7341
dnl ------------------------------------------------------------------------
7342
dnl The following macros search a list of directories for the given
7343
dnl include file and takes appropriate actions if found or not.
7345
dnl $1 - the include file name, the part before the .h
7346
dnl $2 - a variable that holds the matched directory name
7347
dnl $3 - a variable indicating if the search succeeded ("yes"/"no")
7348
dnl (if missing, we exit)
7349
dnl Use just PL_FIND_INC, or the PL_FIND_INC_<...> set for more control.
7351
define(PL_FIND_INC_BEGIN, [
7352
AC_MSG_CHECKING(for $1.h)
7355
define(PL_FIND_INC_SET, [
7356
for dir in $incdirs; do
7357
if test -r "$dir/$1.h"; then
7359
AC_MSG_RESULT($dir/$1.h)
7364
define(PL_FIND_INC_END, [
7365
if test -z "$$2"; then
7367
AC_MSG_RESULT(not found -- exiting)
7371
AC_MSG_RESULT([warning: can't find $1.h, setting $3 to no])
7375
if test "$$2" = "/usr/include"; then
7379
define(PL_FIND_INC, [
7380
PL_FIND_INC_BEGIN($*)
7384
dnl ------------------------------------------------------------------------
7385
dnl The following macro searches a list of directories for the given
7386
dnl library file and takes appropriate actions if found or not.
7387
dnl Use just PL_FIND_LIB, or the PL_FIND_LIB_<...> set for more control.
7390
dnl $1 - the library name, the part after the -l and before the "."
7391
dnl $2 - a variable that holds the matched directory name
7393
dnl PL_FIND_LIB_SET takes:
7394
dnl $3 - a variable that holds the matched library name in a form
7395
dnl suitable for input to the linker (without the suffix, so that
7396
dnl any shared library form is given preference).
7398
dnl PL_FIND_LIB_END takes:
7399
dnl $3 - a variable indicating if the search succeeded ("yes"/"no")
7400
dnl (if missing, we exit)
7402
dnl PL_FIND_LIB takes these as $3 and $4, respectively.
7404
define(PL_FIND_LIB_BEGIN, [
7405
AC_MSG_CHECKING(for lib$1)
7408
define(PL_FIND_LIB_SET, [
7409
for dir in $libdirs; do
7410
if test -z "$LIBEXTNS"; then
7413
for suffix in $LIBEXTNS; do
7414
if test -f "$dir/lib$1.$suffix"; then
7417
AC_MSG_RESULT($dir/lib$1.$suffix)
7423
define(PL_FIND_LIB_END, [
7424
if test -z "$$2"; then
7426
AC_MSG_ERROR(not found -- exiting)
7429
AC_MSG_WARN([can't find lib$1, setting $3 to no])
7433
if test "$$2" = "/usr/lib"; then
7437
define(PL_FIND_LIB, [
7438
PL_FIND_LIB_BEGIN($1, $2)
7439
PL_FIND_LIB_SET($1, $2, $3)
7440
PL_FIND_LIB_END($1, $2, $4)
7442
dnl ------------------------------------------------------------------------
7443
dnl The following macro makes it easier to add includes without adding
7444
dnl redundant -I specifications (to keep the build line concise).
7446
dnl $1 - the searched directory name
7447
dnl $2 - a variable that holds the include specification
7448
dnl $3 - a variable that holds all the directories searched so far
7450
define([PL_ADD_TO_INCS],[
7452
if test "$1" != "default"; then
7456
if test "$1" = "$dir"; then
7461
if test -n "$INCSW"; then
7466
dnl ------------------------------------------------------------------------
7467
dnl The following macro makes it easier to add libs without adding
7468
dnl redundant -L and -l specifications (to keep the build line concise).
7470
dnl $1 - the searched directory name
7471
dnl $2 - the command line option to give to the linker (e.g. -lfoo)
7472
dnl $3 - a variable that holds the library specification
7473
dnl $4 - a variable that holds all the directories searched so far
7475
define([PL_ADD_TO_LIBS],[
7477
if test "$1" != "default"; then
7481
if test "$1" = "$dir"; then
7488
if test "$2" = "$lib"; then
7493
if test -n "$LIBSW"; then
7494
$3="$$3 $LIBSW $LIBL"
7501
dnl ------------------------------------------------------------------------
7502
dnl Determine the dlname of a library to be installed by libtool
7503
dnl PL_GET_DLNAME(STEM,VERSION_INFO,VARIABLE)
7504
dnl For a given library STEM and a given VERSION_INFO (a la
7505
dnl -version-info option of libtool), determine the dlname of the
7506
dnl library in the form lib$STEM.<so_ext>.<so_number>. Set the
7507
dnl variable VARIABLE with the resulting value. This macro should be used
7508
dnl only after the call to AM_PROG_LIBTOOL.
7509
AC_DEFUN([PL_GET_DLNAME],[
7510
if test -z "$LIBTOOL" -a -z "$CC" ; then
7511
AC_MSG_ERROR([Dlname guessings can be done only after libtool is initialized])
7513
AC_MSG_CHECKING([for name of shared library $1])
7518
echo "void f(void){}" > foo.c
7519
../libtool --mode=compile $CC -c foo.c > /dev/null
7520
../libtool --mode=link $CC foo.lo -rpath /usr/lib -version-info $2 \
7521
-o lib$1.la > /dev/null
7522
$3=`grep ^dlname= lib$1.la | sed "s/dlname='\(.*\)'/\1/"`
7525
AC_MSG_RESULT([$[$3]])
7528
dnl ------------------------------------------------------------------------
7529
dnl Determine the dlname of a DLL to be installed by libtool
7530
dnl This is a usefule variation of GET_DLNAME above for dynamically loaded
7531
dnl libraries (DLL's).
7532
dnl PL_GET_DLLNAME(STEM,VARIABLE)
7533
dnl For a given DLL STEM determine the dlname of the
7534
dnl library in the form $STEM.<so_ext>. Set the
7535
dnl variable VARIABLE with the resulting value. This macro should be used
7536
dnl only after the call to AM_PROG_LIBTOOL.
7537
AC_DEFUN([PL_GET_DLLNAME],[
7538
if test -z "$LIBTOOL" -a -z "$CC" ; then
7539
AC_MSG_ERROR([Dlname guessings can be done only after libtool is initialized])
7541
AC_MSG_CHECKING([for name of dynloaded module $1])
7546
echo "void f(void){}" > foo.c
7547
../libtool --mode=compile $CC -c foo.c > /dev/null
7548
../libtool --mode=link $CC foo.lo -rpath /usr/lib -avoid-version -module \
7549
-o $1.la > /dev/null
7550
$2=`grep ^dlname= $1.la | sed "s/dlname='\(.*\)'/\1/"`
7553
AC_MSG_RESULT([$[$2]])
7556
dnl ------------------------------------------------------------------------
7557
dnl PL_EXPAND_EXPRESSION(VARIABLE,EXPRESSION)
7559
dnl Expand recursively a given EXPRESSION, until no variable expansion is
7560
dnl possible. Put the result in VARIABLE.
7561
AC_DEFUN([PL_EXPAND_EXPRESSION],[
7564
str2=`eval echo $str1`
7565
test "$str1" = "$str2" && break
7570
dnl ------------------------------------------------------------------------
7571
dnl PL_OCTAVE_CONFIG_INFO(variable, config-field)
7573
dnl Get Octave configuration values
7575
AC_DEFUN([PL_OCTAVE_CONFIG_INFO], [
7576
$1=`$OCTAVE -q -f <<EOF
7577
printf(octave_config_info("$2"));
7579
dnl ------------------------------------------------------------------------
7580
dnl PL_CONFIG_FILE_EXE(file)
7582
dnl Add file to CONFIG_FILES list and make it executable
7584
AC_DEFUN([PL_CONFIG_FILE_EXE],[
7585
AC_CONFIG_FILES([$1], [chmod +x $1])
7588
dnl cf/docbook.m4 for PLplot
7590
dnl Autoconf macros for the DocBook documentation of PLplot
7592
dnl Copyright (C) 2002, 2003, 2004 Alan W. Irwin
7593
dnl Copyright (C) 2003, 2004 Rafael Laboissiere
7595
dnl This file is part of PLplot.
7597
dnl PLplot is free software; you can redistribute it and/or modify
7598
dnl it under the terms of the GNU Library General Public License as
7599
dnl published by the Free Software Foundation; version 2 of the License.
7601
dnl PLplot is distributed in the hope that it will be useful,
7602
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
7603
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7604
dnl GNU Library General Public License for more details.
7606
dnl You should have received a copy of the GNU Library General Public License
7607
dnl along with PLplot; if not, write to the Free Software
7608
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7610
dnl ### AC_INIT(src/plplotdoc.xml.in)
7611
dnl ### AM_INIT_AUTOMAKE(plplotdoc, 0.4.3)
7615
dnl CHECK_PROG(program, url)
7616
AC_DEFUN(CHECK_PROG, [
7618
pushdef([PROG], translit($1, [a-z], [A-Z]))
7621
AC_HELP_STRING([--with-$1=PATH/]PROG, [Alternative $1 program]),
7624
AC_CHECK_PROG(has_$1, [$prog_$1], found, no)
7625
if test $has_$1 = no ; then
7627
if test -n "$2" ; then
7636
AC_OUTPUT_COMMANDS( [
7637
if test $has_$1 = no ; then]
7639
Program $1 not found.
7640
Install the $1 program in your path or specify its
7641
location with the option --with-$1.
7642
The $1 package can be found at
7644
[fi], has_$1=$has_$1)
7648
dnl CHECK_DTD(title, cache-id, dsssl_dtd, docbookb_ss_dtd, style_spec_use,
7649
dnl external_specification, docbook_dtd, jade_output_type,
7651
dnl ### CONFTEST=conftest
7652
CONFTEST=doc/docbook/conftest
7654
AC_DEFUN(CHECK_DTD, [
7655
AC_CACHE_CHECK($1, pldb_cv_$2, [
7656
echo -e "\nChecking for $1" >> $jadelog
7657
sed -e "s|@DSSSL_DTD@|\"$DSSSL_DTD_PUBID\"|" -e "s|@DB_STYLE_SHEET@|$3|" \
7658
-e "s|@STYLE_SPEC_USE@|$4|" -e "s|@EXTERNAL_SPECIFICATION@|$5|" \
7659
dnl ### -e "s|@CONFTEST@|$CONFTEST|" < cnf/test.dsl.in > $CONFTEST.dsl
7660
-e "s|@CONFTEST@|$CONFTEST|" < doc/docbook/cnf/test.dsl.in > $CONFTEST.dsl
7661
dnl ### sed "s|@DOCBOOK_DTD@|$6|" < cnf/test.xml.in > $CONFTEST.xml
7662
sed "s|@DOCBOOK_DTD@|$6|" < doc/docbook/cnf/test.xml.in > $CONFTEST.xml
7664
$prog_openjade $SGML_CATALOGS -d $CONFTEST.dsl -t $7 -o $CONFTEST.out \
7665
$XML_DECL $CONFTEST.xml > $jadelog.x 2>&1
7666
jade_result=`egrep ":E:" $jadelog.x`
7667
cat $jadelog.x >> $jadelog
7669
if test "$jade_result" = "" ; then
7675
if test $pldb_cv_$2 = no ; then
7680
AC_OUTPUT_COMMANDS([
7681
if test $pldb_cv_$2 = no ; then]
7682
AC_MSG_WARN([Could not find $1.
7683
The following SGML public identifier could not be found in any of
7684
the default SGML catalogs:
7686
Its system identifier[,] i.e. a file usually called
7688
is distributed with the $10 package. Install it in your
7689
system and put the correct entry in the catalog file.
7690
You might also use the configure option --with-sgml-catalog to specify
7691
alternative SGML catalogs.])
7694
pldb_cv_$2=$pldb_cv_$2
7701
AC_DEFUN([FILE_EXT], [
7702
pushdef([FILE], translit($1, [a-z], [A-Z]))
7704
AC_ARG_WITH($1-extension,
7705
AC_HELP_STRING([--with-$1-extension=EXT],
7706
[File extension for the generated FILE files. (Default value: $1)]),
7707
[FILE[_EXT=$withval]])
7708
AC_SUBST(FILE[_EXT])
7714
AC_DEFUN(CHECK_PERL_SCRIPT, [
7716
pushdef([PROG], translit($1, [a-z], [A-Z]))
7719
AC_HELP_STRING([--with-$1=PATH/]PROG, [Alternative $1 Perl script]),
7721
[prog_$1=/usr/bin/$1])
7722
AC_MSG_CHECKING([for Perl script $1])
7723
if test -x $prog_$1 ; then
7728
AC_MSG_RESULT([$has_$1])
7731
if test $has_$1 = no ; then
7736
AC_OUTPUT_COMMANDS( [
7737
if test $has_$1 = no ; then]
7739
Program $1 not found.
7740
Install the perl script $1 program in your system or specify its
7741
location with the option --with-$1.
7742
The $1 package can be found at
7744
[fi], has_$1=$has_$1)
7749
AC_DEFUN(CHECK_PM, [
7750
AC_CACHE_CHECK( $1, pldb_cv_$2, [
7751
cat > conftest.pl << EOF
7754
if test -n "$prog_perl" && $prog_perl conftest.pl >/dev/null 2>&1 ; then
7759
if test $pldb_cv_$2 = no ; then
7764
AC_OUTPUT_COMMANDS([
7765
if test $pldb_cv_$2 = no ; then]
7767
Could not find Perl module $1.
7768
Install it in your system at a place where Perl can find
7769
it (through @INC).])
7771
pldb_cv_$2=$pldb_cv_$2
7777
AC_DEFUN(DOC_OUTPUT_COMMANDS, [
7778
AC_OUTPUT_COMMANDS( [
7779
if test "$print" = "" ; then
7781
echo ' ******************************************************************'
7782
echo ' * Due to some lacking dependencies (see warning messages above), *'
7783
echo ' * it will not be possible to build a printed version of the *'
7784
echo ' * documentation. *'
7785
echo ' ******************************************************************'
7787
if test "$html" = "" ; then
7789
echo ' ******************************************************************'
7790
echo ' * Due to some lacking dependencies (see warning messages above), *'
7791
echo ' * it will not be possible to build a HTML version of the *'
7792
echo ' * documentation. *'
7793
echo ' ******************************************************************'
7795
if test "$info" = "" ; then
7797
echo ' ******************************************************************'
7798
echo ' * Due to some lacking dependencies (see warning messages above), *'
7799
echo ' * it will not be possible to build an info version of the *'
7800
echo ' * documentation. *'
7801
echo ' ******************************************************************'
7803
if test "$man" = "" ; then
7805
echo ' ******************************************************************'
7806
echo ' * Due to some lacking dependencies (see warning messages above), *'
7807
echo ' * it will not be possible to build the man pages of the API *'
7808
echo ' * chapter. *'
7809
echo ' ******************************************************************'
7811
print=$PRINT; html=$HTML; info=$INFO; man=$MAN
7815
dnl ### AC_OUTPUT([Makefile
7816
dnl ### src/Makefile src/plplotdoc.xml src/plplotdoc-html.dsl
7817
dnl ### src/plplotdoc-print.dsl
7818
dnl ### bin/Makefile bin/api2man.pl
7819
dnl ### www/index.html.in])
7821
dnl ------------------------------------------------------------------------
7822
dnl Gnome configuration function.
7823
dnl Adapted from that distributed by the Gnome Project
7824
dnl Added by Rafael Laboissiere on Fri Feb 23 21:26:56 CET 2001
7826
dnl Copyright (C) 2004 Rafael Laboissiere
7828
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
7830
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
7834
AC_DEFUN([GNOME_INIT_HOOK],[
7835
AC_SUBST(GNOME_LIBS)
7836
AC_SUBST(GNOMEUI_LIBS)
7837
dnl AC_SUBST(GNOMEGNORBA_LIBS)
7838
dnl AC_SUBST(GTKXMHTML_LIBS)
7839
dnl AC_SUBST(ZVT_LIBS)
7840
AC_SUBST(GNOME_LIBDIR)
7841
AC_SUBST(GNOME_INCLUDEDIR)
7843
AC_ARG_WITH(gnome-includes,
7844
[ --with-gnome-includes Specify location of GNOME headers],[
7845
CFLAGS="$CFLAGS -I$withval"
7848
AC_ARG_WITH(gnome-libs,
7849
[ --with-gnome-libs Specify location of GNOME libs],[
7850
LDFLAGS="$LDFLAGS -L$withval"
7851
gnome_prefix=$withval
7855
[ --with-gnome Specify prefix for GNOME files],
7856
if test x$withval = xyes; then
7858
dnl Note that an empty true branch is not
7859
dnl valid sh syntax.
7860
ifelse([$1], [], :, [$1])
7862
if test "x$withval" = xno; then
7866
LDFLAGS="$LDFLAGS -L$withval/lib"
7867
CFLAGS="$CFLAGS -I$withval/include"
7868
gnome_prefix=$withval/lib
7873
if test "x$want_gnome" = xyes; then
7875
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
7876
if test "$GNOME_CONFIG" = "no"; then
7877
no_gnome_config="yes"
7879
AC_MSG_CHECKING(if $GNOME_CONFIG works)
7880
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
7882
dnl GNOME_GNORBA_HOOK([],$2)
7883
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
7884
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
7885
dnl GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
7886
dnl GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
7887
dnl ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
7888
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
7889
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
7893
no_gnome_config="yes"
7897
if test x$exec_prefix = xNONE; then
7898
if test x$prefix = xNONE; then
7899
gnome_prefix=$ac_default_prefix/lib
7901
gnome_prefix=$prefix/lib
7904
gnome_prefix=`eval echo \`echo $libdir\``
7907
if test "$no_gnome_config" = "yes"; then
7908
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
7909
if test -f $gnome_prefix/gnomeConf.sh; then
7910
AC_MSG_RESULT(found)
7911
echo "loading gnome configuration from" \
7912
"$gnome_prefix/gnomeConf.sh"
7913
. $gnome_prefix/gnomeConf.sh
7916
AC_MSG_RESULT(not found)
7917
if test x$2 = xfail; then
7918
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
7924
if test -n "$3"; then
7927
AC_MSG_CHECKING(extra library \"$i\")
7930
AC_SUBST(GNOME_APPLETS_LIBS)
7931
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
7932
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
7934
AC_SUBST(GNOME_CAPPLET_LIBS)
7935
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
7936
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
7938
AC_MSG_RESULT(unknown library)
7945
dnl GNOME_INIT ([additional-inits])
7948
AC_DEFUN([GNOME_INIT],[
7949
GNOME_INIT_HOOK([],fail,$1)
7952
dnl Available from the GNU Autoconf Macro Archive at:
7953
dnl http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html
7955
AC_DEFUN([CHECK_GNU_MAKE], [
7956
AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
7957
_cv_gnu_make_command='' ;
7958
dnl Search all the common names for GNU make
7959
for a in "$MAKE" make gmake gnumake ; do
7960
if test -z "$a" ; then continue ; fi ;
7961
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
7962
_cv_gnu_make_command=$a ;
7967
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
7968
if test "x$_cv_gnu_make_command" != "x" ; then
7972
AC_MSG_RESULT("Not found");
7977
dnl Configure paths for GTK+
7978
dnl Owen Taylor 97-11-3
7980
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
7981
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
7983
AC_DEFUN([AM_PATH_GTK],
7985
dnl Get the cflags and libraries from the gtk-config script
7987
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
7988
gtk_config_prefix="$withval", gtk_config_prefix="")
7989
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
7990
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
7991
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
7992
, enable_gtktest=yes)
7998
gtk_config_args="$gtk_config_args gthread"
8003
if test x$gtk_config_exec_prefix != x ; then
8004
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
8005
if test x${GTK_CONFIG+set} != xset ; then
8006
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
8009
if test x$gtk_config_prefix != x ; then
8010
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
8011
if test x${GTK_CONFIG+set} != xset ; then
8012
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
8016
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
8017
min_gtk_version=ifelse([$1], ,0.99.7,$1)
8018
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
8020
if test "$GTK_CONFIG" = "no" ; then
8023
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
8024
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
8025
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
8026
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8027
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
8028
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8029
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
8030
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8031
if test "x$enable_gtktest" = "xyes" ; then
8032
ac_save_CFLAGS="$CFLAGS"
8033
ac_save_LIBS="$LIBS"
8034
CFLAGS="$CFLAGS $GTK_CFLAGS"
8035
LIBS="$GTK_LIBS $LIBS"
8037
dnl Now check if the installed GTK is sufficiently new. (Also sanity
8038
dnl checks the results of gtk-config to some extent
8042
#include <gtk/gtk.h>
8049
int major, minor, micro;
8052
system ("touch conf.gtktest");
8054
/* HP/UX 9 (%@#!) writes to sscanf strings */
8055
tmp_version = g_strdup("$min_gtk_version");
8056
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
8057
printf("%s, bad version string\n", "$min_gtk_version");
8061
if ((gtk_major_version != $gtk_config_major_version) ||
8062
(gtk_minor_version != $gtk_config_minor_version) ||
8063
(gtk_micro_version != $gtk_config_micro_version))
8065
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
8066
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
8067
gtk_major_version, gtk_minor_version, gtk_micro_version);
8068
printf ("*** was found! If gtk-config was correct, then it is best\n");
8069
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
8070
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
8071
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
8072
printf("*** required on your system.\n");
8073
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
8074
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
8075
printf("*** before re-running configure\n");
8077
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
8078
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
8079
(gtk_minor_version != GTK_MINOR_VERSION) ||
8080
(gtk_micro_version != GTK_MICRO_VERSION))
8082
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
8083
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
8084
printf("*** library (version %d.%d.%d)\n",
8085
gtk_major_version, gtk_minor_version, gtk_micro_version);
8087
#endif /* defined (GTK_MAJOR_VERSION) ... */
8090
if ((gtk_major_version > major) ||
8091
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
8092
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
8098
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
8099
gtk_major_version, gtk_minor_version, gtk_micro_version);
8100
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
8101
major, minor, micro);
8102
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
8104
printf("*** If you have already installed a sufficiently new version, this error\n");
8105
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
8106
printf("*** being found. The easiest way to fix this is to remove the old version\n");
8107
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
8108
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
8109
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
8110
printf("*** so that the correct libraries are found at run-time))\n");
8115
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
8116
CFLAGS="$ac_save_CFLAGS"
8117
LIBS="$ac_save_LIBS"
8120
if test "x$no_gtk" = x ; then
8122
ifelse([$2], , :, [$2])
8125
if test "$GTK_CONFIG" = "no" ; then
8126
echo "*** The gtk-config script installed by GTK could not be found"
8127
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
8128
echo "*** your path, or set the GTK_CONFIG environment variable to the"
8129
echo "*** full path to gtk-config."
8131
if test -f conf.gtktest ; then
8134
echo "*** Could not run GTK test program, checking why..."
8135
CFLAGS="$CFLAGS $GTK_CFLAGS"
8136
LIBS="$LIBS $GTK_LIBS"
8138
#include <gtk/gtk.h>
8140
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
8141
[ echo "*** The test program compiled, but did not run. This usually means"
8142
echo "*** that the run-time linker is not finding GTK or finding the wrong"
8143
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
8144
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8145
echo "*** to the installed location Also, make sure you have run ldconfig if that"
8146
echo "*** is required on your system"
8148
echo "*** If you have an old version installed, it is best to remove it, although"
8149
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
8151
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
8152
echo "*** came with the system with the command"
8154
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
8155
[ echo "*** The test program failed to compile or link. See the file config.log for the"
8156
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
8157
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
8158
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
8159
CFLAGS="$ac_save_CFLAGS"
8160
LIBS="$ac_save_LIBS"
8165
ifelse([$3], , :, [$3])
8167
AC_SUBST(GTK_CFLAGS)
7341
# Check how to create a tarball. -*- Autoconf -*-
7343
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7345
# This file is free software; the Free Software Foundation
7346
# gives unlimited permission to copy and/or distribute it,
7347
# with or without modifications, as long as this notice is preserved.
7351
# _AM_PROG_TAR(FORMAT)
7352
# --------------------
7353
# Check how to create a tarball in format FORMAT.
7354
# FORMAT should be one of `v7', `ustar', or `pax'.
7356
# Substitute a variable $(am__tar) that is a command
7357
# writing to stdout a FORMAT-tarball containing the directory
7359
# tardir=directory && $(am__tar) > result.tar
7361
# Substitute a variable $(am__untar) that extract such
7362
# a tarball read from stdin.
7363
# $(am__untar) < result.tar
7364
AC_DEFUN([_AM_PROG_TAR],
7365
[# Always define AMTAR for backward compatibility.
7366
AM_MISSING_PROG([AMTAR], [tar])
7368
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7369
[m4_case([$1], [ustar],, [pax],,
7370
[m4_fatal([Unknown tar format])])
7371
AC_MSG_CHECKING([how to create a $1 tar archive])
7372
# Loop over all known methods to create a tar archive until one works.
7373
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7374
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7375
# Do not fold the above two line into one, because Tru64 sh and
7376
# Solaris sh will not grok spaces in the rhs of `-'.
7377
for _am_tool in $_am_tools
7381
for _am_tar in tar gnutar gtar;
7383
AM_RUN_LOG([$_am_tar --version]) && break
7385
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7386
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7387
am__untar="$_am_tar -xf -"
7390
# Must skip GNU tar: if it does not support --format= it doesn't create
7391
# ustar tarball either.
7392
(tar --version) >/dev/null 2>&1 && continue
7393
am__tar='tar chf - "$$tardir"'
7394
am__tar_='tar chf - "$tardir"'
7395
am__untar='tar xf -'
7398
am__tar='pax -L -x $1 -w "$$tardir"'
7399
am__tar_='pax -L -x $1 -w "$tardir"'
7403
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7404
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7405
am__untar='cpio -i -H $1 -d'
7414
# If the value was cached, stop now. We just wanted to have am__tar
7415
# and am__untar set.
7416
test -n "${am_cv_prog_tar_$1}" && break
7418
# tar/untar a dummy directory, and stop if the command works
7421
echo GrepMe > conftest.dir/file
7422
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7424
if test -s conftest.tar; then
7425
AM_RUN_LOG([$am__untar <conftest.tar])
7426
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7431
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7432
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7434
AC_SUBST([am__untar])
7437
m4_include([cf/ac_pkg_swig.m4])
7438
m4_include([cf/ac_python_devel.m4])
7439
m4_include([cf/acinclude.m4])
7440
m4_include([cf/docbook.m4])
7441
m4_include([cf/gnome.m4])
7442
m4_include([cf/gnu-make.m4])
7443
m4_include([cf/gtk.m4])
7444
m4_include([cf/pkg.m4])