Skip to content
Snippets Groups Projects
Commit c280e3da authored by Claus-Justus Heine's avatar Claus-Justus Heine
Browse files

Start to canonicalize config options. WARNING: THE PACKAGE WILL PROBABLY NOT COMPILE AT THIS STAGE.

parent 5757f6ea
No related branches found
No related tags found
No related merge requests found
if GRAPE if GRAPE
SUBDIRS = gnu-compat BLAS ALBERTA_UTIL SOLVER PLOT_ANSI ALBERTA GRAPE SUBDIRS = gnu-compat ALBERTA_UTIL SOLVER PLOT_ANSI ALBERTA GRAPE
else else
SUBDIRS = gnu-compat BLAS ALBERTA_UTIL SOLVER PLOT_ANSI ALBERTA SUBDIRS = gnu-compat ALBERTA_UTIL SOLVER PLOT_ANSI ALBERTA
endif endif
ACLOCAL_AMFLAGS = -I ./m4 ACLOCAL_AMFLAGS = -I ./m4
...@@ -13,8 +13,8 @@ if MAINTAINER_MODE ...@@ -13,8 +13,8 @@ if MAINTAINER_MODE
cvs-clean: cvs-clean:
@echo Fixing package for cvs commit... @echo Fixing package for cvs commit...
find . -name \*~ -exec rm -rf {} \; find . -name \*~ -exec rm -rf {} \;
find ./ALBERTA ./BLAS ./ALBERTA_UTIL ./PLOT_ANSI ./SOLVER -name Makefile.in -exec rm -rf {} \; find ./ALBERTA ./ALBERTA_UTIL ./PLOT_ANSI ./SOLVER -name Makefile.in -exec rm -rf {} \;
find ./DEMO ./ALBERTA ./BLAS ./ALBERTA_UTIL ./PLOT_ANSI ./SOLVER -name Makefile -exec rm -rf {} \; find ./DEMO ./ALBERTA ./ALBERTA_UTIL ./PLOT_ANSI ./SOLVER -name Makefile -exec rm -rf {} \;
find ./DEMO \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; find ./DEMO \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \;
find ./DEMO \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; find ./DEMO \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \;
find ./DEMO -name Makefile -exec /bin/rm -f {} \; find ./DEMO -name Makefile -exec /bin/rm -f {} \;
...@@ -28,7 +28,7 @@ cvs-clean: ...@@ -28,7 +28,7 @@ cvs-clean:
cp -f NEWS admin/ cp -f NEWS admin/
cp -f README admin/ cp -f README admin/
cp -f INSTALL admin/ cp -f INSTALL admin/
chgrp -R alberta * chgrp -R albert *
dist-hook: dist-hook:
@echo Deleting CVS directories in $(distdir) @echo Deleting CVS directories in $(distdir)
......
...@@ -6,7 +6,7 @@ AC_INIT([alberta], [1.2-pre3], [dani@mathematik.uni-freiburg.de]) ...@@ -6,7 +6,7 @@ AC_INIT([alberta], [1.2-pre3], [dani@mathematik.uni-freiburg.de])
AC_CONFIG_SRCDIR([ALBERTA/src/Common/alberta.h]) AC_CONFIG_SRCDIR([ALBERTA/src/Common/alberta.h])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
AC_CONFIG_FILES([Makefile BLAS/Makefile ALBERTA_UTIL/Makefile AC_CONFIG_FILES([Makefile ALBERTA_UTIL/Makefile
gnu-compat/Makefile gnu-compat/Makefile
GRAPE/Makefile GRAPE/mesh/Makefile GRAPE/Makefile GRAPE/mesh/Makefile
GRAPE/mesh/2d/Makefile GRAPE/mesh/2d/Makefile
...@@ -91,7 +91,7 @@ AC_PATH_XTRA ...@@ -91,7 +91,7 @@ AC_PATH_XTRA
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([malloc.h unistd.h X11/Xlib.h X11/Xutil.h],, AC_CHECK_HEADERS([malloc.h unistd.h X11/Xlib.h X11/Xutil.h],,
[AC_MSG_ERROR([Exiting...])]) [AC_MSG_ERROR([Exiting...])])
AC_CHECK_HEADERS([GL/gl.h GL/glx.h rpc/xdr.h],,[AC_MSG_ERROR([Exiting...])]) AC_CHECK_HEADERS([rpc/xdr.h],,[AC_MSG_ERROR([Exiting...])])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
...@@ -124,70 +124,93 @@ case "$build" in ...@@ -124,70 +124,93 @@ case "$build" in
plot_for_sun=false;; plot_for_sun=false;;
esac esac
case "$build_os" in dnl
*linux*) AC_MSG_RESULT([Building on Linux system...]) dnl check for BLAS library. The BLAS may come under different names. We default
AC_CHECK_LIB(g2c, main) dnl to -lblas, but other possibilities are sunperf, atlas, cpml (Alpha AXP)
AC_CHECK_LIB(blas, main,, dnl etc etc etc etc etc etc etc etc etc etc ...........................
[AC_MSG_WARN([Problems with libblas, also tried lg2c...]) dnl
make_own_blas_lib=libblas.la], dnl Let the user decide what it wants.
[-lg2c]) dnl
AC_CHECK_LIB(X11, main,, AC_ARG_WITH(BLASname,
[AC_MSG_ERROR([Exiting...])], AC_HELP_STRING([--with-BLASname=NAME], [use NAME as the name of the BLAS library (without leading "lib" prefix and trailing suffix). Default: "blas"]),
[${X_LIBS}]) [case "$withval" in
AC_CHECK_LIB(Xext, main,, yes) AC_MSG_ERROR("option \"--with-BLASname\" requires an argument")
[AC_MSG_ERROR([Exiting...])], ;;
[${X_LIBS}]) no) AC_MSG_ERROR("option \"--with-BLASname\" requires an argument")
AC_CHECK_LIB(GL, main,, ;;
[AC_CHECK_LIB(MesaGL,main)], *) LIBBLAS=$withval
[${X_LIBS}]) ;;
;; esac],
*) LIBBLAS=blas)
AC_CHECK_LIB(blas, main,, AC_SUBST(LIBBLAS)
[AC_MSG_WARN([Problems with libblas, creating our own...]) ALBERTA_CHECK_PACKAGE(blas, $LIBBLAS, , ${FLIBS},,,,required)
make_own_blas_lib=libblas.la])
AC_CHECK_LIB(X11, main,,
[AC_MSG_ERROR(Exiting...)],
[${X_LIBS}])
AC_CHECK_LIB(Xext, main,,
[AC_MSG_ERROR(Exiting...)],
[${X_LIBS}])
AC_CHECK_LIB(gl, main)
AC_CHECK_LIB(GL, main)
;;
esac
gltools_include= dnl
LIBGLTOOLS_PRESENT= dnl check for X11
AC_MSG_CHECKING([for libgltools.a]) dnl
AC_ARG_WITH(gltools, AC_PATH_X
AC_HELP_STRING([--with-gltools=PATH], AC_PATH_XTRA
[specify the absolute path of the gltools library]), X_ALL_LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 ${X_EXTRA_LIBS}"
[if test -f $withval/gltools-2-4/libgltools.a; then AC_SUBST(X_ALL_LIBS)
AC_MSG_RESULT([Found libgltools.a in specified directory $withval/gltools-2-4.])
gltools_include="-I$withval/gltools-2-4" dnl
AC_DEFINE(HAVE_LIBGLTOOLS,1, dnl check for OpenGL (maybe Mesa)
[Define to 1 if you have the `gltools-2-4' library (-lgltools)]) dnl
AC_ARG_WITH(GLname,
LIBGLTOOLS_PRESENT=1 AC_HELP_STRING([--with-GLname=NAME], [use NAME as the name of the OpenGL (tm) library (without leading "lib" prefix and trailing suffix). Default: "GL"]),
LIBS="-L$withval/gltools-2-4 -lgltools $LIBS" [case "$withval" in
else yes) AC_MSG_ERROR("option \"--with-GLname\" requires an argument")
AC_MSG_RESULT([*** No libgltools.a found in $withval/gltools-2-4.]) ;;
fi], no) AC_MSG_ERROR("option \"--with-GLname\" requires an argument")
[if test -f ./gltools-2-4/libgltools.a; then ;;
AC_MSG_RESULT([Found libgltools.a in default directory ./gltools-2-4]) *) LIBGL=$withval
gltools_include="-I`pwd`/gltools-2-4" ;;
AC_DEFINE(HAVE_LIBGLTOOLS,1, esac],
[Define to 1 if you have the `gltools-2-4' library (-lgltools)]) LIBGL=GL)
LIBGLTOOLS_PRESENT=1 AC_SUBST(LIBGL)
LIBS="-L`pwd`/gltools-2-4 -lgltools $LIBS" ALBERTA_CHECK_PACKAGE(opengl, $LIBGL, ,${X_ALL_LIBS}, GL/gl.h,,,required)
else
AC_MSG_RESULT([*** No libgltools.a found in ./gltools-2-4]) dnl case "$build_os" in
fi]) dnl *linux*) AC_MSG_RESULT([Building on Linux system...])
dnl AC_CHECK_LIB(g2c, main)
dnl AC_CHECK_LIB(blas, main,,
dnl [AC_MSG_WARN([Problems with libblas, also tried lg2c...])
dnl make_own_blas_lib=libblas.la],
dnl [-lg2c])
dnl AC_CHECK_LIB(X11, main,,
dnl [AC_MSG_ERROR([Exiting...])],
dnl [${X_LIBS}])
dnl AC_CHECK_LIB(Xext, main,,
dnl [AC_MSG_ERROR([Exiting...])],
dnl [${X_LIBS}])
dnl AC_CHECK_LIB(GL, main,,
dnl [AC_CHECK_LIB(MesaGL,main)],
dnl [${X_LIBS}])
dnl ;;
dnl *)
dnl AC_CHECK_LIB(blas, main,,
dnl [AC_MSG_WARN([Problems with libblas, creating our own...])
dnl make_own_blas_lib=libblas.la])
dnl AC_CHECK_LIB(X11, main,,
dnl [AC_MSG_ERROR(Exiting...)],
dnl [${X_LIBS}])
dnl AC_CHECK_LIB(Xext, main,,
dnl [AC_MSG_ERROR(Exiting...)],
dnl [${X_LIBS}])
dnl AC_CHECK_LIB(gl, main)
dnl AC_CHECK_LIB(GL, main)
dnl ;;
dnl esac
dnl
dnl check for optional pacakge gltools
dnl
ALBERTA_CHECK_PACKAGE(gltools, gltools, , ${X_ALL_LIBS}, glmesh.h,,,optional)
dnl dnl
dnl some defines to enable building of alberta_movi dnl some defines to enable building of alberta_movi
dnl dnl
ALBERTA_CHECK_PACKAGE(GRAPE, gr, , ${X_LIBS} -lX11, grape.h,, optional) ALBERTA_CHECK_PACKAGE(grape, gr, , -l${LIBGL} ${X_ALL_LIBS}, grape.h,,, optional)
AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}") AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}")
ALBERTA_LIB_PATH=$prefix/lib ALBERTA_LIB_PATH=$prefix/lib
ALBERTA_INCLUDE_PATH='$(top_srcdir)/ALBERTA/src/Common/ -I$(top_srcdir)/ALBERTA_UTIL' ALBERTA_INCLUDE_PATH='$(top_srcdir)/ALBERTA/src/Common/ -I$(top_srcdir)/ALBERTA_UTIL'
...@@ -213,11 +236,9 @@ AC_SUBST(EL_INDEX) ...@@ -213,11 +236,9 @@ AC_SUBST(EL_INDEX)
AM_CONDITIONAL(PLOT_FOR_SUN, test x$plot_for_sun = xtrue) AM_CONDITIONAL(PLOT_FOR_SUN, test x$plot_for_sun = xtrue)
AM_CONDITIONAL(PLOT_FOR_IBM, test x$plot_for_ibm = xtrue) AM_CONDITIONAL(PLOT_FOR_IBM, test x$plot_for_ibm = xtrue)
AM_CONDITIONAL(PLOT_FOR_TIT, test x$plot_for_tit = xtrue) AM_CONDITIONAL(PLOT_FOR_TIT, test x$plot_for_tit = xtrue)
AM_CONDITIONAL(USE_GLTOOLS, test x$LIBGLTOOLS_PRESENT = x1) AM_CONDITIONAL(USE_GLTOOLS, test -n "${GLTOOLS_LIB}")
AM_CONDITIONAL(USE_EL_INDEX, test x$EL_INDEX = x1) AM_CONDITIONAL(USE_EL_INDEX, test x$EL_INDEX = x1)
AC_SUBST(gltools_include) dnl AC_SUBST(make_own_blas_lib)
AC_SUBST(make_own_blas_lib)
AC_SUBST(LIBGLTOOLS_PRESENT)
AC_OUTPUT AC_OUTPUT
dnl ALBERTA_CHECK_PACKAGE()
dnl dnl
dnl Check for a library + header files dnl Check for a library + header files
dnl
dnl dnl
dnl Arguments: dnl Arguments:
dnl dnl
...@@ -10,49 +10,115 @@ dnl $3: library path (-L$3) ...@@ -10,49 +10,115 @@ dnl $3: library path (-L$3)
dnl $4: additional libraries needed (e.g. -lm -lGL) dnl $4: additional libraries needed (e.g. -lm -lGL)
dnl $5: header name dnl $5: header name
dnl $6: include path (-I$6) dnl $6: include path (-I$6)
dnl $7 \in \{optional, required\}, bail out if required, warning otherwise dnl $7: package prefix, headers and library below $7/
dnl $8 \in \{optional, required\}, bail out if required, warning otherwise
dnl
dnl Default is to check for libraries below $prefix/lib/ and for header-files
dnl below $prefix/include/
dnl
dnl $5 may be empty (e.g. to check for a Fortran library). In this case
dnl $6 is ignored
dnl
dnl $7 may be empty, actually the idea to install libraries and
dnl headers in the same diretory is a little bit awkward.
dnl
dnl This Macro defines the following variables:
dnl
dnl Makefile-substitution
dnl
dnl $1_INCLUDE_PATH
dnl $1_LIB_PATH
dnl $1_INCLUDE
dnl $1_LIB linker flags excluding $4
dnl $1_ALL_LIB linker flags including $4
dnl
dnl config.h preprocessor macros
dnl
dnl HAVE_LIB$2
dnl HAVE_$5_H
dnl
dnl
dnl Helper-macros
dnl
dnl
dnl ALBERTA_CHECK_PKG_OPT(PKGNAME)
dnl dnl
AC_DEFUN([ALBERTA_CHECK_PKG_OPT], AC_DEFUN([ALBERTA_CHECK_PKG_OPT],
[AC_ARG_WITH($1, [m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])
AC_ARG_WITH($1,
AC_HELP_STRING([--without-$1], [disable use of package $1 AC_HELP_STRING([--without-$1], [disable use of package $1
(default: autodetect)]), (default: autodetect)]),
[case "$withval" in [case "$withval" in
yes) yes)
;; ;;
no) no)
m4_bpatsubst([$1],-,_)_DISABLE=yes UPNAME[_DISABLE]=yes
AC_MSG_RESULT([Disabling "$1"])
;; ;;
*) *)
AC_MSG_ERROR(["$withval" should have been either "yes" or "no"]) AC_MSG_ERROR(["$withval" should have been either "yes" or "no"])
;; ;;
esac], esac],
[m4_bpatsubst([$1],-,_)_DISABLE=no]) [UPNAME[_DISABLE]=no])
]) ])
dnl
dnl ALBERTA_CHECK_PKG_HDR_OPT(PKGNAME, INCLUDEPATH)
dnl
AC_DEFUN([ALBERTA_CHECK_PKG_HDR_OPT], AC_DEFUN([ALBERTA_CHECK_PKG_HDR_OPT],
[AC_ARG_WITH($1-headers, [m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])
AC_HELP_STRING([--with-$1-headers=DIR], AC_ARG_WITH($1-headers,
[use $1 include files below directory DIR (default: $2)]), m4_if($2,[],
[AC_HELP_STRING([--with-$1-headers=DIR],
[use $1 include files below directory DIR (default: PREFIX/include/)])],
[AC_HELP_STRING([--with-$1-headers=DIR],
[use $1 include files below directory DIR (default: $2)])]),
[case "$withval" in [case "$withval" in
yes) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument") yes) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument")
;; ;;
no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument") no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument")
;; ;;
*) m4_bpatsubst([$1],-,_)_INCLUDE_PATH=$withval *) UPNAME[_INCLUDE_PATH]=$withval
;; ;;
esac], esac],
[m4_bpatsubst([$1],-,_)_INCLUDE_PATH=$DEFAULT_INCDIR]) test -z "${UPNAME[_INCLUDE_PATH]}" && UPNAME[_INCLUDE_PATH]=$DEFAULT_INCDIR)
]) ])
dnl
dnl headers and libraries below the same directory :(
dnl
AC_DEFUN([ALBERTA_CHECK_PKG_DIR_OPT],
[m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])
AC_ARG_WITH($1-dir,
AC_HELP_STRING([--with-$1-dir=DIR],
[use $1 library (and headers) below directory DIR (no default)]),
[case "$withval" in
yes) AC_MSG_ERROR("option \"--with-$1-dir\" requires an argument")
;;
no) AC_MSG_ERROR("option \"--with-$1-dir\" requires an argument")
;;
*) UPNAME[_LIB_PATH]=$withval
UPNAME[_INCLUDE_PATH]=$withval
;;
esac])
])
dnl
dnl the macro itself
dnl
AC_DEFUN(ALBERTA_CHECK_PACKAGE, AC_DEFUN(ALBERTA_CHECK_PACKAGE,
[AC_REQUIRE([AC_SET_PREFIX]) [AC_REQUIRE([AC_SET_PREFIX])
# dnl
# foobar dnl upcase $1
# dnl
m4_if($7, optional,[ALBERTA_CHECK_PKG_OPT([$1])]) m4_define([UPNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])
dnl if test "$7" = "optional"; then dnl
dnl ALBERTA_CHECK_PKG_OPT([$1]) dnl need to use m4_if, the $i arguments are not shell variables
dnl fi dnl
m4_if($8, optional,[ALBERTA_CHECK_PKG_OPT([$1])])
if test "${m4_bpatsubst([$1],-,_)_DISABLE}" = yes; then dnl
dnl bail out if package disabled completely
dnl
if test "${UPNAME[_DISABLE]}" = yes; then
: :
else else
...@@ -61,18 +127,28 @@ if test -z "$3"; then ...@@ -61,18 +127,28 @@ if test -z "$3"; then
else else
DEFAULT_LIBDIR=$3 DEFAULT_LIBDIR=$3
fi fi
dnl
dnl headers and libraries below the same directory :(
dnl
m4_if($5,[],[],[ALBERTA_CHECK_PKG_DIR_OPT([$1])])
dnl
dnl location of library
dnl
AC_ARG_WITH($1-lib, AC_ARG_WITH($1-lib,
AC_HELP_STRING([--with-$1-lib=DIR], m4_if($3,[],
[use $1 library below directory DIR (default: $3)]), [AC_HELP_STRING([--with-$1-lib=DIR],
[use $1 library below directory DIR (default: EPREFIX/lib/)])],
[AC_HELP_STRING([--with-$1-lib=DIR],
[use $1 library below directory DIR (default: $3)])]),
[case "$withval" in [case "$withval" in
yes) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument") yes) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument")
;; ;;
no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument") no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument")
;; ;;
*) m4_bpatsubst([$1],-,_)_LIB_PATH=$withval *) UPNAME[_LIB_PATH]=$withval
;; ;;
esac], esac],
m4_bpatsubst([$1],-,_)_LIB_PATH=$DEFAULT_LIBDIR) test -z "${UPNAME[_LIB_PATH]}" && UPNAME[_LIB_PATH]=$DEFAULT_LIBDIR)
dnl dnl
dnl now for the header file dnl now for the header file
dnl dnl
...@@ -81,45 +157,57 @@ if test -z "$6"; then ...@@ -81,45 +157,57 @@ if test -z "$6"; then
else else
DEFAULT_INCDIR=$6 DEFAULT_INCDIR=$6
fi fi
m4_if($5,[],[],[ALBERTA_CHECK_PKG_HDR_OPT([$1], [$6])]) m4_if($5,[],[],[ALBERTA_CHECK_PKG_HDR_OPT([$1], [PREFIX/include/])])
dnl dnl
dnl now check if the library and header files exist dnl now check if the library and header files exist
dnl dnl
if test "$7" = "optional" ; then if test "$8" = "optional" ; then
AC_CHECK_LIB($2, main, AC_CHECK_LIB($2, main,
[m4_bpatsubst([$1],-,_)_LIB="-L${m4_bpatsubst([$1],-,_)_LIB_PATH} -l$2"], [UPNAME[_LIB]="-L${UPNAME[_LIB_PATH]} -l$2"
[m4_bpatsubst([$1],-,_)_LIB="" UPNAME[_ALL_LIB]="-L${UPNAME[_LIB_PATH]} -l$2 $4"],
m4_bpatsubst([$1],-,_)_LIB_PATH="" [UPNAME[_LIB]=""
m4_bpatsubst([$1],-,_)_INCLUDE_PATH=""], UPNAME[_ALL_LIB]=""
-L${m4_bpatsubst([$1],-,_)_LIB_PATH} $4) UPNAME[_LIB_PATH]=""
UPNAME[_INCLUDE]=""
UPNAME[_INCLUDE_PATH]=""],
-L${UPNAME[_LIB_PATH]} $4)
else else
AC_CHECK_LIB($2, main, AC_CHECK_LIB($2, main,
[m4_bpatsubst([$1],-,_)_LIB="-L${m4_bpatsubst([$1],-,_)_LIB_PATH} -l$2 $4"], [UPNAME[_LIB]="-L${UPNAME[_LIB_PATH]} -l$2"
UPNAME[_ALL_LIB]="-L${UPNAME[_LIB_PATH]} -l$2 $4"],
[AC_MSG_ERROR([Library "lib$2" was not found])], [AC_MSG_ERROR([Library "lib$2" was not found])],
-L$m4_bpatsubst([$1],-,_)_LIB_PATH $4) -L$UPNAME[_LIB_PATH] $4)
fi fi
if test "x${m4_bpatsubst([$1],-,_)_LIB}" = "x" ; then if test "x${UPNAME[_LIB]}" = "x" ; then
: :
else else
if test -n "$5"; then if test -n "$5"; then
dnl dnl
dnl check for the header file dnl check for the header file
dnl dnl
[ac_]m4_bpatsubst([$1],-,_)_save_CPPFLAGS="$CPPFLAGS" [ac_]UPNAME[_save_CPPFLAGS]="$CPPFLAGS"
CPPFLAGS="-I${m4_bpatsubst([$1],-,_)_INCLUDE_PATH} $CPPFLAGS" CPPFLAGS="-I${UPNAME[_INCLUDE_PATH]} $CPPFLAGS"
if test "$7" = "optional" ; then if test "$8" = "optional" ; then
AC_CHECK_HEADERS($5,, [m4_bpatsubst([$1],-,_)_LIB="" AC_CHECK_HEADERS($5,, [UPNAME[_LIB]=""
m4_bpatsubst([$1],-,_)_LIB_PATH="" UPNAME[_ALL_LIB]=""
m4_bpatsubst([$1],-,_)_INCLUDE_PATH=""]) UPNAME[_INCLUDE]=""
UPNAME[_LIB_PATH]=""
UPNAME[_INCLUDE_PATH]=""])
else else
AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found])) AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found]))
fi fi
CPPCLAGS="${[ac_]m4_bpatsubst([$1],-,_)_save_CPPFLAGS}" dnl
dnl no need to use -I... if header is located in standard include path
dnl
if ! test -f "${UPNAME[_INCLUDE_PATH]}/$5"; then
UPNAME[_INCLUDE]=""
fi
CPPCLAGS="${[ac_]UPNAME[_save_CPPFLAGS]}"
fi fi
dnl dnl
dnl define makefile substitutions and config.h macros dnl define makefile substitutions and config.h macros
dnl dnl
if test "x${m4_bpatsubst([$1],-,_)_LIB}" = "x" ; then if test "x${UPNAME[_LIB]}" = "x" ; then
: :
else else
AC_DEFINE(m4_bpatsubst(m4_toupper([HAVE_LIB$2]),-,_), AC_DEFINE(m4_bpatsubst(m4_toupper([HAVE_LIB$2]),-,_),
...@@ -129,7 +217,9 @@ fi ...@@ -129,7 +217,9 @@ fi
fi dnl disable fi fi dnl disable fi
AC_SUBST(m4_bpatsubst([$1],-,_)_INCLUDE_PATH) AC_SUBST(UPNAME[_INCLUDE_PATH])
AC_SUBST(m4_bpatsubst([$1],-,_)_LIB_PATH) AC_SUBST(UPNAME[_LIB_PATH])
AC_SUBST(m4_bpatsubst([$1],-,_)_LIB) AC_SUBST(UPNAME[_INCLUDE])
AC_SUBST(UPNAME[_LIB])
AC_SUBST(UPNAME[_ALL_LIB])
]) ])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment