I have changed this part:
Code: Select all
# Check whether --with-iv or --without-iv was given.
if test "${with_iv+set}" = set; then
withval="$with_iv"
HAVE_IV=1
if test "$with_iv" = "no" ; then
HAVE_IV=0
echo "Not compiling with interviews."
elif test "$with_iv" = "yes" ; then # look in default places
echo "Looking for InterViews in the usual places--"
xprefix=`echo "$prefix" | sed 's;/[^/]*$;;'`
if test -d $xprefix/iv ; then #look in inside the nrn
IV_DIR=$xprefix/iv
IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
elif test -d /usr/local/iv ; then
echo " not in $IV_DIR"
IV_DIR=/usr/local/iv
IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
else
echo " not in $IV_DIR"
IV_LIBS="-lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBS"
fi
if test -n "$IV_DIR" ; then
echo "Assuming top level iv directory at $IV_DIR"
echo " and libraries in $IV_LIBDIR"
else
echo "Assuming InterViews in a standard? place."
fi
else # Location specified
IV_DIR=$with_iv
IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
fi
Code: Select all
# Check whether --with-iv or --without-iv was given.
if test "${with_iv+set}" = set; then
withval="$with_iv"
HAVE_IV=1
echo "HAVE_IV is $HAVE_IV"
if test "$with_iv" = "no" ; then
HAVE_IV=0
echo "Not compiling with interviews."
elif test "$with_iv" = "yes" ; then # look in default places
echo "Looking for InterViews in the usual places--"
xprefix=`echo "$prefix" | sed 's;/[^/]*$;;'`
echo "looking for iv in $xprefix"
if test -d $xprefix/iv ; then
IV_DIR="$xprefix/iv"
echo "iv directory is $IV_DIR"
IV_LIBDIR=""$IV_DIR"/"$host_cpu"/lib"
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
echo "iv library is $IV_LIBDIR"
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
elif test -d /usr/local/iv ; then
echo " not in $IV_DIR"
IV_DIR=/usr/local/iv
echo "iv directory is $IV_DIR"
IV_LIBDIR=""$IV_DIR"/"$host_cpu"/lib"
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
echo "iv library is $IV_LIBDIR"
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
else
echo " not in $IV_DIR"
fi
if test -n "$IV_DIR" ; then
echo "Assuming top level iv directory at $IV_DIR"
echo " and libraries in $IV_LIBDIR"
else
echo "Looking for intervies in specified location"
fi
else # Location specified
IV_DIR=$with_iv
echo "iv directory is $IV_DIR"
IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib
if test ! -d $IV_LIBDIR ; then
IV_LIBDIR="$IV_DIR"/lib
fi
echo "iv library is $IV_LIBDIR"
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
IV_INCLUDE=-I$IV_DIR/include
fi
ps: I think it would be more reasonable to check the specified location first.