Link Octave tests and examples against Octave libraries
- Tests for bugs associated with loading .oct modules git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13083 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a2a42c7038
commit
e4a92ee692
2 changed files with 38 additions and 47 deletions
|
|
@ -331,12 +331,11 @@ python_clean:
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# Make sure these locate your Octave installation
|
# Make sure these locate your Octave installation
|
||||||
OCTAVE_INCLUDE= $(DEFS) @OCTAVEEXT@
|
|
||||||
OCTAVE_LIB =
|
|
||||||
OCTAVE = @OCTAVE@ -qf
|
OCTAVE = @OCTAVE@ -qf
|
||||||
|
OCTAVE_CXX = $(DEFS) @OCTAVE_CPPFLAGS@ @OCTAVE_CXXFLAGS@
|
||||||
|
|
||||||
# Extra Octave specific dynamic linking options
|
# Extra Octave specific dynamic linking options
|
||||||
OCTAVE_DLNK = @OCTAVEDYNAMICLINKING@
|
OCTAVE_DLNK = @OCTAVE_LDFLAGS@
|
||||||
OCTAVE_SO = @OCTAVE_SO@
|
OCTAVE_SO = @OCTAVE_SO@
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
@ -346,7 +345,7 @@ OCTAVE_SO = @OCTAVE_SO@
|
||||||
|
|
||||||
octave: $(SRCS)
|
octave: $(SRCS)
|
||||||
$(SWIG) -octave $(SWIGOPT) $(INTERFACEPATH)
|
$(SWIG) -octave $(SWIGOPT) $(INTERFACEPATH)
|
||||||
$(CXX) -g -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(INCLUDES) -I$(OCTAVE_INCLUDE)
|
$(CXX) -g -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
|
||||||
$(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CSRCS) $(INCLUDES)
|
$(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CSRCS) $(INCLUDES)
|
||||||
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
|
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
|
||||||
|
|
||||||
|
|
@ -356,7 +355,7 @@ octave: $(SRCS)
|
||||||
|
|
||||||
octave_cpp: $(SRCS)
|
octave_cpp: $(SRCS)
|
||||||
$(SWIG) -c++ -octave $(SWIGOPT) $(INTERFACEPATH)
|
$(SWIG) -c++ -octave $(SWIGOPT) $(INTERFACEPATH)
|
||||||
$(CXX) -g -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) -I$(OCTAVE_INCLUDE)
|
$(CXX) -g -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
|
||||||
$(CXXSHARED) -g $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
|
$(CXXSHARED) -g $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
|
||||||
76
configure.in
76
configure.in
|
|
@ -900,7 +900,6 @@ AC_SUBST(PERL5CCFLAGS)
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
|
|
||||||
OCTAVEBIN=
|
OCTAVEBIN=
|
||||||
OCTAVEDYNAMICLINKING=
|
|
||||||
OCTAVE_SO=.oct
|
OCTAVE_SO=.oct
|
||||||
|
|
||||||
AC_ARG_WITH(octave, AS_HELP_STRING([--without-octave], [Disable Octave])
|
AC_ARG_WITH(octave, AS_HELP_STRING([--without-octave], [Disable Octave])
|
||||||
|
|
@ -908,58 +907,51 @@ AS_HELP_STRING([--with-octave=path], [Set location of Octave executable]),[OCTAV
|
||||||
|
|
||||||
# First, check for "--without-octave" or "--with-octave=no".
|
# First, check for "--without-octave" or "--with-octave=no".
|
||||||
if test x"${OCTAVEBIN}" = xno -o x"${with_alllang}" = xno ; then
|
if test x"${OCTAVEBIN}" = xno -o x"${with_alllang}" = xno ; then
|
||||||
AC_MSG_NOTICE([Disabling Octave])
|
AC_MSG_NOTICE([Disabling Octave])
|
||||||
OCTAVE=
|
OCTAVE=
|
||||||
else
|
|
||||||
|
|
||||||
# First figure out what the name of Octave is
|
# First figure out what the name of Octave is
|
||||||
|
elif test "x$OCTAVEBIN" = xyes; then
|
||||||
|
AC_CHECK_PROGS(OCTAVE, octave)
|
||||||
|
|
||||||
if test "x$OCTAVEBIN" = xyes; then
|
|
||||||
AC_CHECK_PROGS(OCTAVE, octave)
|
|
||||||
else
|
else
|
||||||
OCTAVE="$OCTAVEBIN"
|
OCTAVE="$OCTAVEBIN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Octave header files)
|
|
||||||
if test -n "$OCTAVE"; then
|
if test -n "$OCTAVE"; then
|
||||||
OCTAVECONFIG=[`echo $OCTAVEBIN | sed 's|octave\([^/]*\)$|octave-config\1|'`]
|
AC_MSG_CHECKING([for mkoctfile])
|
||||||
if test -r "$OCTAVECONFIG"; then
|
AS_IF([test "x`${OCTAVE} -qfH --eval 'mkoctfile -p CXX' 2>/dev/null`" != x],[
|
||||||
OCTAVEDIR=`$OCTAVECONFIG -p OCTINCLUDEDIR | sed 's|/octave$||'`
|
AC_MSG_RESULT([yes])
|
||||||
else
|
],[
|
||||||
OCTAVEDIR="/usr/include"
|
AC_MSG_ERROR([mkoctfile is not installed])
|
||||||
fi
|
])
|
||||||
if test "$OCTAVEDIR" != ""; then
|
AC_MSG_CHECKING([for Octave preprocessor flags])
|
||||||
dirs="$OCTAVEDIR/octave $OCTAVEDIR"
|
OCTAVE_CPPFLAGS=
|
||||||
OCTAVEEXT=""
|
for n in CPPFLAGS INCFLAGS; do
|
||||||
for i in $dirs; do
|
OCTAVE_CPPFLAGS="${OCTAVE_CPPFLAGS} "`$OCTAVE -qfH --eval "mkoctfile -p $n"`
|
||||||
if test -r $i/octave/oct.h; then
|
done
|
||||||
OCTAVEEXT="$i"
|
AC_MSG_RESULT($OCTAVE_CPPFLAGS)
|
||||||
break;
|
AC_MSG_CHECKING([for Octave compiler flags])
|
||||||
fi
|
OCTAVE_CXXFLAGS=
|
||||||
done
|
for n in ALL_CXXFLAGS; do
|
||||||
if test "$OCTAVEEXT" = "" ; then
|
OCTAVE_CXXFLAGS="${OCTAVE_CXXFLAGS} "`$OCTAVE -qfH --eval "mkoctfile -p $n"`
|
||||||
AC_MSG_RESULT(not found)
|
done
|
||||||
else
|
AC_MSG_RESULT($OCTAVE_CXXFLAGS)
|
||||||
AC_MSG_RESULT($OCTAVEEXT)
|
AC_MSG_CHECKING([for Octave linker flags])
|
||||||
fi
|
OCTAVE_LDFLAGS=
|
||||||
|
for n in RDYNAMIC_FLAG LFLAGS RLD_FLAG OCTAVE_LIBS LIBS; do
|
||||||
AC_MSG_CHECKING(for Octave compiler options)
|
OCTAVE_LDFLAGS="${OCTAVE_LDFLAGS} "`$OCTAVE -qfH --eval "mkoctfile -p $n"`
|
||||||
OCTAVECCFLAGS=""
|
done
|
||||||
AC_MSG_RESULT($OCTAVECCFLAGS)
|
AC_MSG_RESULT($OCTAVE_LDFLAGS)
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(could not figure out how to run octave)
|
AC_MSG_RESULT(could not figure out how to run octave)
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(OCTAVE)
|
AC_SUBST(OCTAVE)
|
||||||
AC_SUBST(OCTAVEEXT)
|
|
||||||
AC_SUBST(OCTAVE_SO)
|
AC_SUBST(OCTAVE_SO)
|
||||||
AC_SUBST(OCTAVEDYNAMICLINKING)
|
AC_SUBST(OCTAVE_CPPFLAGS)
|
||||||
AC_SUBST(OCTAVELIB)
|
AC_SUBST(OCTAVE_CXXFLAGS)
|
||||||
AC_SUBST(OCTAVECCFLAGS)
|
AC_SUBST(OCTAVE_LDFLAGS)
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
# Look for java
|
# Look for java
|
||||||
|
|
@ -2215,7 +2207,7 @@ AC_SUBST(SKIP_PERL5)
|
||||||
|
|
||||||
|
|
||||||
SKIP_OCTAVE=
|
SKIP_OCTAVE=
|
||||||
if test -z "$OCTAVE" || test -z "$OCTAVEEXT" ; then
|
if test -z "$OCTAVE" ; then
|
||||||
SKIP_OCTAVE="1"
|
SKIP_OCTAVE="1"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(SKIP_OCTAVE)
|
AC_SUBST(SKIP_OCTAVE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue