Only use the SCM_ API when the function `scm_slot_exists_p' exists

(needed for GOOPS support).  This function was renamed during the
Guile 1.5 series from `scm_slots_exists_p'.

Report the right runtime library when invoked with -scm -ldflags.1


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5263 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2003-11-04 19:15:59 +00:00
commit d62a05a6b4
2 changed files with 3 additions and 2 deletions

View file

@ -172,7 +172,7 @@ public:
}
}
else if (strcmp (argv[i], "-ldflags") == 0) {
printf("%s\n", SWIG_GUILE_RUNTIME);
printf("%s\n", use_scm_interface ? SWIG_GUILESCM_RUNTIME : SWIG_GUILE_RUNTIME);
SWIG_exit (EXIT_SUCCESS);
}
else if (strcmp (argv[i], "-Linkage") == 0

View file

@ -17,6 +17,7 @@ AH_BOTTOM([
/* Values returned by SWIG when invoked with the -ldflags option */
#define SWIG_GUILE_RUNTIME "-L" LIBDIR " -lswigguile" RELEASE_SUFFIX
#define SWIG_GUILESCM_RUNTIME "-L" LIBDIR " -lswigguilescm" RELEASE_SUFFIX
#define SWIG_MZSCHEME_RUNTIME "-L" LIBDIR " -lswigmz" RELEASE_SUFFIX
#define SWIG_PERL_RUNTIME "-L" LIBDIR " -lswigpl" RELEASE_SUFFIX
#define SWIG_PIKE_RUNTIME "-L" LIBDIR " -lswigpike" RELEASE_SUFFIX
@ -815,7 +816,7 @@ else
fi
AC_MSG_CHECKING(whether Guile's SCM_ API works)
AC_LINK_IFELSE([#include <libguile.h>
int main() { SCM s; return SCM_STRING_LENGTH(s); }], GUILE_SCM_INTERFACE=1, )
int main() { SCM s; scm_slot_exists_p(SCM_BOOL_F, SCM_BOOL_F); return SCM_STRING_LENGTH(s); }], GUILE_SCM_INTERFACE=1, )
if test -n "$GUILE_SCM_INTERFACE" ; then
AC_MSG_RESULT(yes)
else