Menu

#11 Configure when oasys is not in ../ fails.

v2.7
open
nobody
None
5
2010-05-07
2010-05-07
Anonymous
No

Updated aclocal/oasys.ac in order to set right variables when oasys is not in ../ directory.

How to reproduce bug:
1. Install oasys with --prefix=/usr (or what you prefer)
2. Remove (or rename) oasys source directory
3. Download dtn sources and run ./configure (without any particular arguments, or with --with-oasys if you install oasys in a directory different to /usr). Results will be: "oasys not found".

This patch is with regards to Oasys, and should be applied to that source tree.

Patch:

--- a/aclocal/oasys.ac.orig
+++ b/aclocal/oasys.ac
@@ -48,7 +48,9 @@
dnl AC_OASYS_CONFIG [major] [minor]
dnl
AC_DEFUN(AC_OASYS_CONFIG, [
- rm -rf oasys
+ if test -d oasys ; then
+ rm -rf oasys
+ fi

ac_oasysver_major=$1
ac_oasysver_minor=$2
@@ -61,38 +63,47 @@
ac_oasysdir=$withval)

AC_MSG_CHECKING([for an oasys installation (version $ac_oasysver_major.$ac_oasysver_minor or better)])
+
+ ac_oaysdir_ver=

- ac_oasysdir_ver=`find .. -maxdepth 1 -type d -name $ac_oasysdir_ver_base.* | tail -1`
if test "$ac_oasysdir" = "" ; then
- if test -d "$ac_oasysdir_ver" ; then
- ac_oasysdir=$ac_oasysdir_ver
- elif test -d ../oasys ; then
- ac_oasysdir=../oasys
-
- else
- ac_oasysdir=/usr
- # Set the oasys paths properly. OASYS_INCDIR points to the parent
- # directory containing the oasys header files or the source
- # directory itself with a symlink (include/oasys -> .),
- # OASYS_LIBDIR points to the directory where the libraries are.
- # OASYS_ETCDIR points to where the various scripts are.
- #
- OASYS_INCDIR="$ac_oasysdir/include"
- OASYS_LIBDIR="$ac_oasysdir/lib"
- OASYS_ETCDIR="$ac_oasysdir/share/oasys"
- fi
- if test -d oasys ; then
- rm -rf oasys
- fi
- mkdir oasys oasys/include
- OASYS_INCDIR="oasys/include"
- OASYS_LIBDIR="oasys/lib"
- OASYS_ETCDIR="oasys/share"
- ln -s ../../$ac_oasysdir $OASYS_INCDIR
- ln -s ../$ac_oasysdir/lib $OASYS_LIBDIR
- ln -s ../$ac_oasysdir $OASYS_ETCDIR
- fi

+ # Set the oasys paths properly. OASYS_INCDIR points to the parent
+ # directory containing the oasys header files or the source
+ # directory itself with a symlink (include/oasys -> .),
+ # OASYS_LIBDIR points to the directory where the libraries are.
+ # OASYS_ETCDIR points to where the various scripts are.
+ #
+
+ ac_oasysdir_ver=`find .. -maxdepth 1 -type d -name $ac_oasysdir_ver_base.* | tail -1`
+
+ if test -d "$ac_oasysdir_ver" ; then
+ ac_oasysdir=$ac_oasysdir_ver
+
+ elif test -d ../oasys ; then
+ ac_oasysdir=../oasys
+ ac_oasysdir_ver=$ac_oasysdir
+ fi
+ fi
+
+ if test -d "$ac_oasysdir_ver" ; then
+ mkdir oasys oasys/include
+ OASYS_INCDIR="oasys/include"
+ OASYS_LIBDIR="oasys/lib"
+ OASYS_ETCDIR="oasys/share"
+ ln -s ../../$ac_oasysdir $OASYS_INCDIR
+ ln -s ../$ac_oasysdir/lib $OASYS_LIBDIR
+ ln -s ../$ac_oasysdir $OASYS_ETCDIR
+
+ else
+ if test "$ac_oasysdir" = "" ; then
+ ac_oasysdir=/usr
+ fi
+ OASYS_INCDIR="$ac_oasysdir/include"
+ OASYS_LIBDIR="$ac_oasysdir/lib"
+ OASYS_ETCDIR="$ac_oasysdir/share/oasys"
+ fi
+
#
if test ! -d $OASYS_INCDIR ; then echo ""
AC_OASYS_CONFIG_HELP

Leo Iannacone.

Discussion


Log in to post a comment.