* m4/gspnlib.m4: New file.
* configure.ac: Call AX_CHECK_GSPNLIB. * Makefile.am (EXTRA_DIST): Add m4/gspnlib.m4. * iface/gspn/Makefile.am (AM_CPPFLAGS): Add $(LIBGSPN_CPPFLAGS). (libspotgspn_la_LIBADD, check_PROGRAMS, dottygspn_SOURCES, dottygspn_LDADD): New variables. * iface/gspn/gspn.hh (gspn_interface): New class. (gspn_exeption): Take a string argument and adjust all callers. (operator<<): Define for gspn_exeption. * iface/gspn/gspn.cc (gspn_interface::gspn_interface, gspn_interface::~gspn_interface): New. * iface/gspn/gspnlib.h: Delete, it belongs to GSPN. * iface/gspn/dottygspn.cc: New file.
This commit is contained in:
parent
49fd9579da
commit
4ac192ac1e
9 changed files with 137 additions and 120 deletions
29
m4/gspnlin.m4
Normal file
29
m4/gspnlin.m4
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
AC_DEFUN([AX_CHECK_GSPNLIB], [
|
||||
AC_ARG_WITH([gspn],
|
||||
[AC_HELP_STRING([--with-gpsn=/root/of/greatspn],
|
||||
[build interface with GreadSPN])])
|
||||
if test x${with_gspn-no} != xno; then
|
||||
ax_tmp_LDFLAGS=$LDFLAGS
|
||||
ax_tmp_LIBS=$LIBS
|
||||
LIBGSPN_LDFLAGS=
|
||||
if test x${with_gspn-yes} != xyes; then
|
||||
# Try to locate the headers and libraries.
|
||||
gspn_version_sh=$with_gspn/SOURCES/contrib/version.sh;
|
||||
AC_CHECK_FILE($gspn_version_sh,,
|
||||
[AC_MSG_ERROR(
|
||||
[Cannot find $gspn_version_sh. Check --with-gspn's argument.])])
|
||||
gspn_version=`$gspn_version_sh`
|
||||
LIBGSPN_LDFLAGS="-L$with_gspn/$gspn_version/2bin/lib"
|
||||
LIBGSPN_CPPFLAGS="-I$with_gspn/SOURCES/WN/INCLUDE"
|
||||
fi
|
||||
LDFLAGS="$LDFLAGS $LIBGSPN_LDFLAGS"
|
||||
AC_CHECK_LIB([gspnRG], [initialize], [],
|
||||
[AC_MSG_ERROR([Cannot find libgspnRG. Check --with-gspn's argument.])], [-lm -lfl])
|
||||
LIBGSPN_LDFLAGS="$LIBGSPN_LDFLAGS -lgspnRG -lm -lfl"
|
||||
LDFLAGS="$ax_tmp_LDFLAGS"
|
||||
LIBS="$ax_tmp_LIBS"
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_GSPN], [test x${with_gspn+set} = xset])
|
||||
AC_SUBST([LIBGSPN_CPPFLAGS])
|
||||
AC_SUBST([LIBGSPN_LDFLAGS])
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue