Commit 11f23504 authored by fogal1's avatar fogal1

Reworked the top of the macro to be more autoconf friendly.

* Use AS_HELP_STRING instead of AC_HELP_STRING
* Use m4_toupper in place of m4_translit, for readability.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7029 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4826da67
......@@ -95,18 +95,52 @@ dnl Made it initialize withval to 'no' and initialize with_package. Added
dnl logic to the action-if-not-given part of AC_ARG_WITH to change withval
dnl only if DEFAULT specifications actually exist.
dnl
dnl Tom Fogal, Wed Dec 10 13:13:28 MST 2008
dnl Reworked the top of the macro to be more autoconf friendly and legible.
dnl
dnl Tom Fogal, Mon Dec 15 14:49:44 MST 2008
dnl Fixed a bad 'test'. Forgot to mention before, but made some small
dnl changes to m4 variables in a previous commit.
dnl
AC_DEFUN(VAC_ARG_WITH3RD,
[
dnl Rename some variables for legibility.
m4_define([ax_m4_lib_short_name], [$1]) dnl for display/variable purposes
m4_define([ax_m4_header], [$2]) dnl to check if we can include it
m4_define([ax_m4_library], [$3]) dnl lib to link against
m4_define([ax_m4_function], [$4]) dnl function in the lib
m4_define([ax_m4_help_string], [$5]) dnl help string for with option
withval=no
AC_ARG_WITH($1, AC_HELP_STRING([--with-$1],ifelse(,[$5],[use $1; build related plugin(s)/code],[$5])),,
if test -n "$DEFAULT_[]m4_translit([$1],[a-z0-9-],[A-Z0-9_])_LIBLOC"; then
withval=$DEFAULT_[]m4_translit([$1],[a-z0-9-],[A-Z0-9_])_LIBLOC:$DEFAULT_[]m4_translit([$1],[a-z0-9-],[A-Z0-9_])_LIBDEP
fi)
AC_ARG_WITH(ax_m4_lib_short_name,
[AS_HELP_STRING([--with-ax_m4_lib_short_name],
AS_IF(test -n "ax_m4_help_string",
[ax_m4_help_string],
[use ax_m4_lib_short_name; build related plugin(s)/code]
))]
)
m4_append([ax_m4_shellvar_libloc], [DEFAULT]) dnl
m4_append([ax_m4_shellvar_libloc], m4_toupper(ax_m4_lib_short_name), [_])
m4_append([ax_m4_shellvar_libloc], [LIBLOC], [_]) dnl
dnl temporarily -- this libdep should go away though.
m4_append([ax_m4_shellvar_libdep], [DEFAULT]) dnl
m4_append([ax_m4_shellvar_libdep], m4_toupper(ax_m4_lib_short_name), [_])
m4_append([ax_m4_shellvar_libdep], [LIBDEP], [_]) dnl
AS_IF([test "x${withval}" != "xno"], dnl
[ #
# look up _LIBLOC, _LIBDEP variables
#
AS_IF([test -n "${ax_m4_shellvar_libloc}"], dnl
[withval=${ax_m4_shellvar_libloc}:${ax_m4_shellvar_libdep}]
) dnl
] dnl
)
m4_toupper(ax_m4_lib_short_name)_INCLUDE=""
m4_toupper(ax_m4_lib_short_name)_LIB=""
m4_toupper(ax_m4_lib_short_name)_TARGET=""
with_[]m4_translit([$1],[A-Z0-9_],[a-z0-9-])=$withval
m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_INCLUDE=""
m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_LIB=""
m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_TARGET=""
ifelse(,[$2],incfile=[$1].h,incfile=[$2])
ifelse(,[$3],libtags="[$1]",libtags="[$3]")
incdirs="include inc ."
......@@ -329,6 +363,5 @@ AC_DEFUN(VAC_ARG_WITH3RD,
AC_SUBST(m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_INCLUDE)
AC_SUBST(m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_LIB)
AC_SUBST(m4_translit([$1],[a-z0-9-],[A-Z0-9_])[]_TARGET)
]
)
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
......
......@@ -899,12 +899,12 @@ Optional Packages:
be ommitted)
--without-pty Disable PTY use
--with-zlib=INC-DIR,LIB-DIR Use the GNU zlib compression
--with-hdf5 use hdf5; build related plugin(s)/code
--with-silo use silo; build related plugin(s)/code
--with-hdf5 if test -n ""; then else use hdf5; build related plugin(s)/code
fi
--with-exodus=<DIR> enable Exodus driver
--with-exodus-include=<DIR> specify Exodus include path
--with-exodus-lib=<DIR> specify Exodus lib path
--with-pdb use pdb; build related plugin(s)/code
--with-mili=DIR Location of Mili header and library
--with-google-perftools=DIR Location of tc-malloc from google-perftools
--with-hdf4=INC-DIR,LIB-DIR Location of HDF4 header and library
......@@ -7502,22 +7502,33 @@ esac
# All libs should be switched to use this new macro.
#
withval=no
# Check whether --with-hdf5 or --without-hdf5 was given.
if test "${with_hdf5+set}" = set; then
withval="$with_hdf5"
else
if test -n "$DEFAULT_HDF5_LIBLOC"; then
withval=$DEFAULT_HDF5_LIBLOC:$DEFAULT_HDF5_LIBDEP
fi
fi;
with_hdf5=$withval
if test "x${withval}" != "xno"; then
#
# look up _LIBLOC, _LIBDEP variables
#
if test -n "${DEFAULT_HDF5_LIBLOC}"; then
withval=${DEFAULT_HDF5_LIBLOC}:${DEFAULT_HDF5_LIBDEP}
fi
fi
HDF5_INCLUDE=""
HDF5_LIB=""
HDF5_TARGET=""
incfile=hdf5.h
libtags="hdf5"
incdirs="include inc ."
......@@ -7919,7 +7930,6 @@ echo "${ECHO_T}no" >&6
# Check for possible zlib dependence. If there is, we'll just add -lz
if test -n "$HDF5_LIB"; then
if test -n "`strings $HDF5_LIBFILE | grep -i inflateInit`"; then
......@@ -7948,22 +7958,33 @@ fi
# Handle the Silo library
#
withval=no
# Check whether --with-silo or --without-silo was given.
if test "${with_silo+set}" = set; then
withval="$with_silo"
else
if test -n "$DEFAULT_SILO_LIBLOC"; then
withval=$DEFAULT_SILO_LIBLOC:$DEFAULT_SILO_LIBDEP
fi
fi;
with_silo=$withval
if test "x${withval}" != "xno"; then
#
# look up _LIBLOC, _LIBDEP variables
#
if test -n "${DEFAULT_HDF5_LIBLOCDEFAULT_SILO_LIBLOC}"; then
withval=${DEFAULT_HDF5_LIBLOCDEFAULT_SILO_LIBLOC}:${DEFAULT_HDF5_LIBDEPDEFAULT_SILO_LIBDEP}
fi
fi
SILO_INCLUDE=""
SILO_LIB=""
SILO_TARGET=""
incfile=silo.h
libtags="siloxx siloh5 silo"
incdirs="include inc ."
......@@ -8365,7 +8386,6 @@ echo "${ECHO_T}no" >&6
# Check for possible dependence on HDF5
if test -n "$SILO_LIB"; then
if test -n "`strings $SILO_LIBFILE | grep -i 'SILO built with HDF5'`"; then
......@@ -8466,22 +8486,33 @@ fi
# See of --with-pdb was specified. Use PDB lite otherwise.
#
withval=no
# Check whether --with-pdb or --without-pdb was given.
if test "${with_pdb+set}" = set; then
withval="$with_pdb"
else
if test -n "$DEFAULT_PDB_LIBLOC"; then
withval=$DEFAULT_PDB_LIBLOC:$DEFAULT_PDB_LIBDEP
fi
fi;
with_pdb=$withval
if test "x${withval}" != "xno"; then
#
# look up _LIBLOC, _LIBDEP variables
#
if test -n "${DEFAULT_HDF5_LIBLOCDEFAULT_SILO_LIBLOCDEFAULT_PDB_LIBLOC}"; then
withval=${DEFAULT_HDF5_LIBLOCDEFAULT_SILO_LIBLOCDEFAULT_PDB_LIBLOC}:${DEFAULT_HDF5_LIBDEPDEFAULT_SILO_LIBDEPDEFAULT_PDB_LIBDEP}
fi
fi
PDB_INCLUDE=""
PDB_LIB=""
PDB_TARGET=""
incfile=pdb.h
libtags="pdb"
incdirs="include inc ."
......@@ -8883,7 +8914,6 @@ echo "${ECHO_T}no" >&6
if test -z "$PDB_LIB"; then
echo "$as_me:$LINENO: checking for PDB lite (e.g Silo)" >&5
echo $ECHO_N "checking for PDB lite (e.g Silo)... $ECHO_C" >&6
......@@ -11165,19 +11195,17 @@ echo "${ECHO_T}$PYDIR, version $PYVERSION" >&6
;;
esac
# Check for PyParsing
echo "$as_me:$LINENO: checking for PyParsing" >&5
echo $ECHO_N "checking for PyParsing... $ECHO_C" >&6
if test -r "$PYDIR/lib/$PYVERSION/site-packages/pyparsing.pyc"; then
echo "$as_me:$LINENO: result: yes" >&5
if test -r "$PYDIR/lib/$PYVERSION/site-packages/pyparsing.pyc"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_PYPARSING 1
_ACEOF
else
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
......
......@@ -21,9 +21,6 @@
/* Define if you have the gdal headers. */
#undef HAVE_GDAL_H
/* Define if you have pyparsing */
#undef HAVE_PYPARSING
/* Define if you have the IceT library */
#undef HAVE_ICET
......@@ -78,6 +75,9 @@
/* Define if you have the netcdf header. */
#undef HAVE_NETCDF_H
/* Define if you have pyparsing. */
#undef HAVE_PYPARSING
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment