Skip to content
Snippets Groups Projects
Commit af79db61 authored by slevy's avatar slevy
Browse files

Avoid "test: too many arguments" error if some $with_ string is empty.

parent 20105093
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ dnl ---------------------------------------------------------------------
dnl Check for FLTK
AC_ARG_WITH(fltk, [ --with-fltk=<d> find FLTK in -I<d>/include/FL -L<d>/lib ], with_fltk=$withval, with_fltk=/usr/local)
if test -n "$with_fltk" -a -d "$with_fltk"; then
if test -n "$with_fltk" && test -d "$with_fltk"; then
# maybe should test both $with_fltk and the include directory therein??
if test -f "$with_fltk/include/FL/Fl.H"; then
FLTK_INC=-I$with_fltk/include
......@@ -94,7 +94,7 @@ if test "$with_mesa" != "yes"; then
AC_CHECK_LIB(GLU, gluProject, GLLIBS="-lGLU -lGL",
:, -lGL $XLIBS -lm), :, $XLIBS -lm)
fi
if test -z "$GLLIBS" -a "$with_mesa" != "no"; then
if test -z "$GLLIBS" && test "no" != "$with_mesa"; then
AC_CHECK_LIB(MesaGL, glBegin,
AC_CHECK_LIB(MesaGLU, gluProject, GLLIBS="-lMesaGLU -lMesaGL",
:, -lMesaGL $XLIBS -lm), :, $XLIBS -lm)
......@@ -196,7 +196,7 @@ AC_SUBST(CC)
AC_SUBST(CXX)
starlab_path="$with_kira"
if test "$with_kira" = "maybe" -o "$with_kira" = "yes"; then
if test "$with_kira" = "maybe" || test "$with_kira" = "yes"; then
if test -d "$STARLAB_PATH"; then
starlab_path="$STARLAB_PATH"
else
......@@ -204,7 +204,7 @@ if test "$with_kira" = "maybe" -o "$with_kira" = "yes"; then
fi
fi
if test -n "$starlab_path" -a -d "$starlab_path"; then
if test -n "$starlab_path" && test -d "$starlab_path"; then
echo "Configuring with starlab=$starlab_path"
KIRA_INC=-I$starlab_path/inc
KIRA_LIB="-L$starlab_path/lib -ltdyn -ldyn -lnode -lsstar -lstd"
......@@ -221,7 +221,7 @@ AC_ARG_WITH(ieeeio-lib, [ --with-ieeeio-lib=LDOPTS (-LDIR/lib -lieeeio) ],
AC_ARG_WITH(ieeeio-inc, [ --with-ieeeio-inc=INCOPTS (-IDIR/include)],
[IEEEIO_INC="$withval"; with_ieeeio=yes])
if test -n "$with_ieeeio" -a "no" != $with_ieeeio; then
if test -n "$with_ieeeio" && test "no" != $with_ieeeio; then
if test "yes" = "$with_ieeeio"; then
IEEEIO_LIB=${IEEEIO_LIB:-"-lieeeio"}
else
......@@ -239,7 +239,7 @@ AC_ARG_WITH(elumens-lib, [ --with-elumens-lib=LDOPTS (-LDIR/lib -lspiclops)],
AC_ARG_WITH(elumens-inc, [ --with-elumens-inc=INCOPTS (-IDIR/include)],
[ELUMENS_INC="$withval"; with_elumens=yes])
if test -n "$with_elumens" -a "no" != "$with_elumens"; then
if test -n "$with_elumens" && test "no" != "$with_elumens"; then
if test "yes" = "$with_elumens"; then
ELUMENS_LIB=${ELUMENS_LIB:-"-lspiclops"}
else
......@@ -254,7 +254,7 @@ dnl ---------------------------------------------------------------------
dnl Check for CAVE
AC_ARG_WITH(cave, [ --with-cave=<d> find CAVE in -I<d>/include -L<d>/lib ], with_cave=$withval)
if test -n "$with_cave" -a -d "$with_cave"; then
if test -n "$with_cave" && test -d "$with_cave"; then
# maybe should test both $with_cave and the include directory therein??
if test -f "$with_cave/include/cave_ogl.h"; then
CAVE_INC=-I$with_cave/include
......@@ -278,7 +278,7 @@ PV_FLAGS="$PV_FLAGS -DUSE_NETHACK"
PV_FLAGS="$PV_FLAGS -DUSE_WARP"
AC_ARG_WITH(model, [ --with-model Accept Maya obj models], with_model=$withval, with_model=yes)
if test -n "$with_model" -a "no" != "$with_model"; then
if test -n "$with_model" && test "no" != "$with_model"; then
PV_FLAGS="$PV_FLAGS -DUSE_MODEL"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment