fix compilation of swig/python on macosx
authorPaul Brossier <piem@altern.org>
Mon, 30 May 2005 08:07:40 +0000 (08:07 +0000)
committerPaul Brossier <piem@altern.org>
Mon, 30 May 2005 08:07:40 +0000 (08:07 +0000)
configure.ac

index 77d818986d02afcee8edd6803a0acae014da6d53..002ecd172170e79ef23bc1220fbabc9b16d614fe 100644 (file)
@@ -161,6 +161,20 @@ AM_CONDITIONAL(SWIGFOUND, test "${SWIG}" != "no")
 AM_PATH_PYTHON
 AM_CONDITIONAL(PYTHONFOUND, test "${PYTHON}" != "no")
 
+#if PYTHONFOUND
+case "${host_os}" in
+darwin*)
+  SWCFLAGS="-Wno-long-double"
+  SWLDFLAGS="-bundle -framework python -L${prefix}/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+  ;;
+*)
+  SWLDFLAGS="-shared"
+  ;;
+esac
+
+AC_SUBST(SWCFLAGS)
+AC_SUBST(SWLDFLAGS)
+
 AC_PATH_PROG(DOCBOOK_TO_MAN,docbook-to-man,no)
 AM_CONDITIONAL(DOCBOOKFOUND, test "${DOCBOOK_TO_MAN}" != "no")