Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alberta3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ians-nmh-siebert
alberta
alberta3
Commits
a7561f5d
Commit
a7561f5d
authored
Jun 14, 2003
by
Claus-Justus Heine
Browse files
Options
Downloads
Patches
Plain Diff
Initial revision
parent
56c4cc25
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
m4/albert-check.m4
+127
-0
127 additions, 0 deletions
m4/albert-check.m4
m4/check-package.m4
+72
-0
72 additions, 0 deletions
m4/check-package.m4
m4/set-prefix.m4
+7
-0
7 additions, 0 deletions
m4/set-prefix.m4
with
206 additions
and
0 deletions
m4/albert-check.m4
0 → 100644
+
127
−
0
View file @
a7561f5d
AC_DEFUN([ALBERT_OPTIONS],
[
AC_ARG_ENABLE(el_index,
[ --enable-el_index use an EL_INDEX enabled version of the ALBERT
libraries (default is off)],
[ELINDEX=1],
ELINDEX=)
dnl
AC_ARG_ENABLE(debug,
[ --enable-debug use debug-enabled ALBERT libraries (default: off)],
[ALBERT_DEBUG=1],
ALBERT_DEBUG=0)
])
dnl
dnl Check for ALBERT libraries at given dimensions, taking ELINDEX and DEBUG
dnl into account. $1 is DIM, $2 ist DIM_OF_WORLD
dnl
AC_DEFUN([ALBERT_CHECK],
[AC_REQUIRE([ALBERT_OPTIONS])
AC_REQUIRE([AC_SET_PREFIX])
dnl
dnl library location
dnl
AC_ARG_WITH(albert-libs,
[ --with-albert-libs=LOCATION use ALBERT libraries installed below LOCATION.
The library is expected under "LOCATION/".
Default is the value of the environment variable
ALBERT_LIB_PATH, if set, otherwise 'PREFIX/lib'],
[case "$withval" in
yes|no)
;;
*) ALBERT_LIB_PATH=${withval}
;;
esac],
[if test "x$ALBERT_LIB_PATH" = "x" ; then
ALBERT_LIB_PATH=`eval eval echo ${libdir}`
fi])
AC_SUBST(ALBERT_LIB_PATH)
dnl
dnl next for headers
dnl
AC_ARG_WITH(albert-includes,
[ --with-albert-includes=LOCATION use ALBERT includes installed below
LOCATION. Default is the value of the environment
variable ALBERT_INCLUDE_PATH, if set, otherwise
'PREFIX/include'],
[case "$withval" in
yes|no)
;;
*) ALBERT_INCLUDE_PATH=${withval}
;;
esac],
[if test "x$ALBERT_INCLUDE_PATH" = "x" ; then
ALBERT_INCLUDE_PATH=`eval eval echo ${includedir}`
fi])
AC_SUBST(ALBERT_INCLUDE_PATH)
dnl
dnl Now check for the library. Take into account that we might need
dnl gltools and PLOTansi
dnl
if test "x$_ALBERT_AUX_LIBS_CHECKED_" = "x" ; then
AC_CHECK_PKG(OpenGL, GL, /usr/X11R6/lib, ${X_LIBS} -lX11,
gl.h, /usr/X11R6/include/GL, optional)
AC_CHECK_PKG(PLOT, PLOTansi, $ALBERT_LIB_PATH, $OpenGL_LIB,
PLOTansi.h, $ALBERT_INCLUDE_PATH, optional)
AC_CHECK_PKG(gltools, gltools, `pwd`/../gltools-2-4, $OpenGL_LIB,
glwin.h,`pwd`/../gltools-2-4, optional)
AC_LANG_PUSH(Fortran 77)
AC_CHECK_LIB(blas, dnrm2,
[FLIBS="-lblas ${FLIBS}"
AC_DEFINE(HAVE_LIBBLAS, 1, [Define to 1 if you have libblas])],
[AC_MSG_ERROR([Required BLAS library was not found])])
AC_LANG_POP(Fortran 77)
AC_CHECK_PKG(albert_util, albert_util, $ALBERT_LIB_PATH, -lm,
albert_util.h, $ALBERT_INCLUDE_PATH, required)
AC_CHECK_PKG(csolver, csolver, $ALBERT_LIB_PATH, ${FLIBS} -lalbert_util -lm,
oem.h, $ALBERT_INCLUDE_PATH, required)
_ALBERT_AUX_LIBS_CHECKED_=checked
fi
dnl
dnl Now check for libALBERT_XXX itself
dnl
ALBERT_LIB_$1$2=ALBERT$1$2_${ALBERT_DEBUG}${ELINDEX}
ALBERT_LIB_$1$2_C=ac_cv_lib_ALBERT$1$2_${ALBERT_DEBUG}${ELINDEX}
ALBERT_GFX_LIBS_$1$2=""
AC_CHECK_LIB($ALBERT_LIB_$1$2, main,
[ALBERT_LIBS_$1$2="-L$ALBERT_LIB_PATH -l$ALBERT_LIB_$2$2 $csolver_LIB"],,
$csolver_LIB)
if test "x$ALBERT_LIBS_$1$2" = "x" ; then
if test "x$OpenGL_LIB" = "x" ; then :; else
AC_MSG_NOTICE([Trying again with OpenGL])
ALBERT_GFX_LIBS_$1$2="$OpenGL_LIB ${X_LIB} -lX11"
eval "unset ${ALBERT_LIB_$1$2_C}___main"
AC_CHECK_LIB($ALBERT_LIB_$1$2, main,
[ALBERT_LIBS_$1$2="-L$ALBERT_LIB_PATH -l$ALBERT_LIB_$1$2 $csolver_LIB"],,
$csolver_LIB $ALBERT_GFX_LIBS_$1$2)
if test "x$ALBERT_LIBS_$1$2" = "x" && \
test "x$gltools_LIB" != "x" ; then
AC_MSG_NOTICE([Trying again with gltools])
eval "unset ${ALBERT_LIB_$1$2_C}___main"
ALBERT_GFX_LIBS_$1$2="$gltools_LIB $OpenGL_LIB ${X_LIB} -lX11"
AC_CHECK_LIB($ALBERT_LIB_$1$2, main,
[ALBERT_LIBS_$1$2="-L$ALBERT_LIB_PATH -l$ALBERT_LIB_$1 $csolver_LIB"],,
$csolver_LIB $ALBERT_GFX_LIBS_$1$2)
fi
if test "x$ALBERT_LIBS_$1$2" = "x" && \
test "x$PLOT_LIB" != "x" ; then
AC_MSG_NOTICE([Trying again with PLOTansi])
eval "unset ${ALBERT_LIB_$1$2_C}___main"
ALBERT_GFX_LIBS_$1$2="$PLOT_LIB $OpenGL_LIB ${X_LIB} -lX11"
AC_CHECK_LIB($ALBERT_LIB_$1$2, main,
[ALBERT_LIBS_$1$2="-L$ALBERT_LIB_PATH -l$ALBERT_LIB_$1 $csolver_LIB"],,
$csolver_LIB $ALBERT_GFX_LIBS_$1$2)
fi
if test "x$ALBERT_LIBS_$1$2" = "x" && \
test "x$PLOT_LIB" != "x" && \
test "x$gltools_LIB" != "x" ; then
AC_MSG_NOTICE([Trying again with PLOTansi AND gltools])
eval "unset ${ALBERT_LIB_$1$2_C}___main"
ALBERT_GFX_LIBS_$1$2="$gltools_LIB $PLOT_LIB $OpenGL_LIB ${X_LIB} -lX11"
AC_CHECK_LIB($ALBERT_LIB_$1$2, main,
[ALBERT_LIBS_$1$2="-L$ALBERT_LIB_PATH -l$ALBERT_LIB_$1 $csolver_LIB"],,
$csolver_LIB $ALBERT_GFX_LIBS_$1$2)
fi
fi
fi
])
This diff is collapsed.
Click to expand it.
m4/check-package.m4
0 → 100644
+
72
−
0
View file @
a7561f5d
dnl
dnl Check for a library + header files
dnl
AC_DEFUN(AC_CHECK_PKG,
[AC_ARG_WITH($1-lib,
[ --with-$1-lib=DIR use $1 library below directory DIR (default: $3)],
[case "$withval" in
yes) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument")
;;
no) AC_MSG_ERROR("option \"--with-$1-lib\" requires an argument")
;;
*) $1_DIR=$withval
;;
esac],
$1_DIR=$3)
AC_ARG_WITH($1-headers,
[ --with-$1-headers=DIR use $1 include files below directory DIR
(default: $6)],
[case "$withval" in
yes) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument")
;;
no) AC_MSG_ERROR("option \"--with-$1-headers\" requires an argument")
;;
*) $1_INCS=$withval
;;
esac],
$1_INCLUDES=$6)
dnl
dnl now check if the library and header files exist
dnl
if test "$7" = "optional" ; then
AC_CHECK_LIB($2, main,
[$1_LIB="-L$$1_DIR -l$2"],
[$1_LIB=""
$1_DIR=""
$1_INCLUDES=""],
-L$$1_DIR $4)
else
AC_CHECK_LIB($2, main,
[$1_LIB="-L$$1_DIR -l$2 $4"],
[AC_MSG_ERROR([Library "lib$2" was not found])],
-L$$1_DIR $4)
fi
if test "x$$1_LIB" = "x" ; then
:
else
dnl
dnl check for the header file
dnl
ac_$1_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$$1_INCLUDES $CPPFLAGS"
if test "$7" = "optional" ; then
AC_CHECK_HEADERS($5,, [$1_LIB=""
$1_DIR=""
$1_INCLUDES=""])
else
AC_CHECK_HEADERS($5,, AC_MSG_ERROR([Header file "$5" was not found]))
fi
CPPCLAGS="$ac_$1_save_CPPFLAGS"
dnl
dnl define makefile substitutions and config.h macros
dnl
if test "x$$1_LIB" = "x" ; then
:
else
AC_DEFINE(m4_toupper([HAVE_LIB$2]), 1, Define to 1 if you have lib$2)
fi
fi
AC_SUBST($1_INCLUDES)
AC_SUBST($1_DIR)
AC_SUBST($1_LIB)
])
This diff is collapsed.
Click to expand it.
m4/set-prefix.m4
0 → 100644
+
7
−
0
View file @
a7561f5d
dnl set prefix to its proper value, so that one can define substitutions
dnl depending on the value of prefix
AC_DEFUN(AC_SET_PREFIX,
[test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment