chiark / gitweb /
work around guile 1.8+ swig problems
authorSteven G. Johnson <stevenj@mit.edu>
Wed, 28 Aug 2013 15:51:51 +0000 (11:51 -0400)
committerSteven G. Johnson <stevenj@mit.edu>
Wed, 28 Aug 2013 15:51:51 +0000 (11:51 -0400)
configure.ac
swig/nlopt-guile.i

index b6626fe547bb7009e05d6d26153d5a43ddb79a77..a6eedfd2b2238812737684f373990b3b0a72aacb 100644 (file)
@@ -367,10 +367,10 @@ dnl add gcc warnings, in debug/maintainer mode only
 if test "$enable_debug" = yes || test "$USE_MAINTAINER_MODE" = yes; then
 if test $ac_cv_prog_gcc = yes; then
    if test "$ac_test_CFLAGS" != "set"; then
-      CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations"
+      CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations"
    fi
    if test "$ac_test_CXXFLAGS" != "set"; then
-      CXXFLAGS="$CXXFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wshadow -Wwrite-strings -Wredundant-decls -Wundef -Wconversion"
+      CXXFLAGS="$CXXFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wno-long-long -pedantic -Wshadow -Wwrite-strings -Wredundant-decls -Wundef -Wconversion"
    fi
    if test "x$with_cxx" = xyes; then
       CFLAGS=$CXXFLAGS
index d9987a30e0fad1de08fe1957c1eacfc20f11448b..c3eb2972dd0db60f6f14c7ce5c1feb5d9893095f 100644 (file)
@@ -1,5 +1,14 @@
 // -*- C++ -*-
 
+%{
+// work around obsolete stuff used by swig guile
+#if SCM_MAJOR_VERSION >= 2
+#  define gh_symbol2scm scm_from_latin1_symbol
+#else
+#  define gh_symbol2scm scm_str2symbol
+#endif
+%}
+
 %typemap(throws) std::runtime_error %{
   scm_throw(gh_symbol2scm("runtime-error"), 
            scm_list_1(scm_from_locale_string(($1).what())));