]> www.ginac.de Git - ginac.git/blobdiff - configure.in
- sources now include "ginac.h" instead of <ginac/ginac.h>, changed Makefile.am
[ginac.git] / configure.in
index 94f525de80b45859ca5c496e2abf2622d7d703be..9249f9da7809a17d830ddb69e572cb3311452491 100644 (file)
@@ -18,10 +18,10 @@ dnl autoconf sees "AC_MAJOR_VERSION" and complains about an undefined macro
 dnl (don't we all *love* M4?)...
 
 GINACLIB_MAJOR_VERSION=0
-GINACLIB_MINOR_VERSION=4
-GINACLIB_MICRO_VERSION=1
+GINACLIB_MINOR_VERSION=5
+GINACLIB_MICRO_VERSION=0
 GINACLIB_INTERFACE_AGE=0
-GINACLIB_BINARY_AGE=1
+GINACLIB_BINARY_AGE=0
 GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
 
 AC_SUBST(GINACLIB_MAJOR_VERSION)
@@ -143,18 +143,40 @@ fi
 AC_SUBST(TUTORIAL_TARGETS)
 AC_SUBST(REFERENCE_TARGETS)
 
-dnl Configure GiNaC-cint, if requested
+dnl Configure GiNaC-cint
+LIBGINACCINT=
+GINACCINTDIR=
 if [[ "x$with_cint" != "xno" ]]; then
-  echo "with_cint is set to: $with_cint"
-  CINTSYSDIR=$with_cint
+  if [[ "x$enable_static" != "xyes" ]]; then
+    AC_MSG_ERROR([currently GiNaC-cint needs to build a static libginac])
+  fi
+  if [[ "x$with_cint" = "xyes" ]]; then
+    if [[ "x$CINTSYSDIR" = "x" ]]; then
+      AC_MSG_ERROR([please export \$CINTSYSDIR or specify --with-cint=CINTSYSDIR])
+    fi
+  else
+    CINTSYSDIR=$with_cint
+    export CINTSYSDIR
+  fi
   AC_PATH_PROG(CINT, cint, "", $CINTSYSDIR:$PATH)
   AC_PATH_PROG(MAKECINT, makecint, "", $CINTSYSDIR:$PATH)
-  if [[ "$cint" -a "$makecint" ]]; then
-    AC_MSG_RESULT([Configuring GiNaC-cint])
+  if [[ "$CINT" -a "$MAKECINT" ]]; then
+    AC_MSG_RESULT([creating cint/Makefile])
+    (cd cint && \
+    $MAKECINT -mk Makefile.makecint -o ginaccint -m \
+      -D OBSCURE_CINT_HACK -D NO_NAMESPACE_GINAC \
+      -I .. -I $CINTSYSDIR -m -H ../ginac/ginac.h dummies.h \
+      -C++ dummies.cpp -C++ ginaccint.cpp \
+      -l ./libginac.a -lcln -cint -M0x10; \
+    cd ..)
+    LIBGINACCINT="libginac.a"
+    GINACCINTDIR="cint"
   else
     AC_MSG_ERROR([Cannot configure GiNaC-cint])
   fi
 fi
+AC_SUBST(LIBGINACCINT)
+AC_SUBST(GINACCINTDIR)
 
 dnl Output makefiles etc.
 AC_OUTPUT([
@@ -168,5 +190,6 @@ tools/Makefile
 doc/Makefile
 doc/tutorial/Makefile
 doc/reference/Makefile
+cint/Makefile
 ], [chmod +x ginac-config])
 echo "Configuration done. Now type \"make\"."