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

Optional packages can be disabled with one switch.

parent cc9c436e
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,16 @@ dnl
dnl $1: dim, $2: DOW, $3: optional/required
dnl
AC_DEFUN([ALBERT_CHECK_QGL],
[ALBERT_CHECK_QT($3)
ac_albert_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-DDIM=$1 -DDIM_OF_WORLD=$2 -DEL_INDEX=${EL_INDEX} -I$ALBERT_INCLUDE_PATH $CPPFLAGS"
ALBERT_CHECK_PACKAGE(albert-qgl$1$2, albert-qgl$1$2, $ALBERT_LIB_PATH,
$ALBERT_LIBS_$1$2 $Qt_LIB $OpenGL_LIB,
albert-qgl.h, $ALBERT_INCLUDE_PATH, $3)
CPPFLAGS="$ac_albert_save_CPPFLAGS"
[if test "${with_albert_qgl22+set}" = set -a \
"$with_albert_qgl22" = no; then
:
else
ALBERT_CHECK_QT($3)
ac_albert_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-DDIM=$1 -DDIM_OF_WORLD=$2 -DEL_INDEX=${EL_INDEX} -I$ALBERT_INCLUDE_PATH $CPPFLAGS"
ALBERT_CHECK_PACKAGE(albert-qgl$1$2, albert-qgl$1$2, $ALBERT_LIB_PATH,
$ALBERT_LIBS_$1$2 $Qt_LIB $OpenGL_LIB,
albert-qgl.h, $ALBERT_INCLUDE_PATH, $3)
CPPFLAGS="$ac_albert_save_CPPFLAGS"
fi
])
\ No newline at end of file
......@@ -20,13 +20,13 @@ AC_HELP_STRING([--without-$1], [disable use of package $1
yes)
;;
no)
DISABLE=yes
m4_bpatsubst([$1],-,_)_DISABLE=yes
;;
*)
AC_MSG_ERROR(["$withval" should have been either "yes" or "no"])
;;
esac],
[DISABLE=no])
[m4_bpatsubst([$1],-,_)_DISABLE=no])
])
AC_DEFUN(ALBERT_CHECK_PACKAGE,
[AC_REQUIRE([AC_SET_PREFIX])
......@@ -34,12 +34,11 @@ AC_DEFUN(ALBERT_CHECK_PACKAGE,
# foobar
#
m4_if($7, optional,[ALBERT_CHECK_PKG_OPT([$1])])
m4_ifval([$7], [optional], echo barfoo)
dnl if test "$7" = "optional"; then
dnl ALBERT_CHECK_PKG_OPT([$1])
dnl fi
if test "$DISABLE" = yes; then
if test "${m4_bpatsubst([$1],-,_)_DISABLE}" = yes; then
:
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment