]> www.ginac.de Git - ginac.git/blobdiff - configure
#define CINT_CONVERSION_WORKAROUND added to configure
[ginac.git] / configure
index 4e16b9ab16728660e2ba9d5abdfdf689a414ff69..5856b5d251870b0a1388482919d20b9f14d3e2a4 100755 (executable)
--- a/configure
+++ b/configure
@@ -545,9 +545,9 @@ fi
 
 GINACLIB_MAJOR_VERSION=0
 GINACLIB_MINOR_VERSION=5
-GINACLIB_MICRO_VERSION=1
-GINACLIB_INTERFACE_AGE=1
-GINACLIB_BINARY_AGE=1
+GINACLIB_MICRO_VERSION=2
+GINACLIB_INTERFACE_AGE=2
+GINACLIB_BINARY_AGE=2
 GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
 
 
@@ -2310,9 +2310,16 @@ else
 fi
 done
 
+if test "x${ac_cv_header_readline_readline_h}" != "xyes" -o "x${ac_cv_header_readline_history_h}" != "xyes"; then
+  
+ginac_warning_txt="$ginac_warning_txt
+== I could not find the headers for libreadline (needed for building ginsh).
+"
+ginac_warning=yes
+fi
 save_LIBS=$LIBS
 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:2316: checking for readline in -lreadline" >&5
+echo "configure:2323: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2320,7 +2327,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2324 "configure"
+#line 2331 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2334,7 +2341,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2361,12 +2368,19 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+if test "x${ac_cv_lib_readline_readline}" != "xyes"; then
+  
+ginac_warning_txt="$ginac_warning_txt
+== I could not find libreadline (needed by ginsh).
+"
+ginac_warning=yes
+fi
 GINSH_LIBS=$LIBS
 LIBS=$save_LIBS
 
 
 echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
-echo "configure:2370: checking for cout in -lstdc++" >&5
+echo "configure:2384: checking for cout in -lstdc++" >&5
 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2374,7 +2388,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lstdc++  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2378 "configure"
+#line 2392 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2388,7 +2402,7 @@ int main() {
 cout()
 ; return 0; }
 EOF
-if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2420,17 +2434,17 @@ for ac_hdr in iostream vector map string list typeinfo iterator stdexcept algori
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2424: checking for $ac_hdr" >&5
+echo "configure:2438: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
+#line 2443 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2461,17 +2475,17 @@ for ac_hdr in sstream strstream
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2465: checking for $ac_hdr" >&5
+echo "configure:2479: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2470 "configure"
+#line 2484 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2503,17 +2517,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2507: checking for $ac_hdr" >&5
+echo "configure:2521: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2512 "configure"
+#line 2526 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2540,17 +2554,17 @@ for ac_hdr in cln.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2544: checking for $ac_hdr" >&5
+echo "configure:2558: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2549 "configure"
+#line 2563 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2585,7 +2599,7 @@ done
 
 
     echo $ac_n "checking for doublefactorial in -lcln""... $ac_c" 1>&6
-echo "configure:2589: checking for doublefactorial in -lcln" >&5
+echo "configure:2603: checking for doublefactorial in -lcln" >&5
     saved_LIBS="${LIBS}"
     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2594,14 +2608,14 @@ else
         case "${ac_cv_header_cln_cln_h}" in
         "yes")
             cat > conftest.$ac_ext <<EOF
-#line 2598 "configure"
+#line 2612 "configure"
 #include "confdefs.h"
 #include <cln/cln.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
-if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ginac_cv_lib_cln_link="-lcln"
 else
@@ -2614,14 +2628,14 @@ rm -f conftest*
             ;;
         *)
             cat > conftest.$ac_ext <<EOF
-#line 2618 "configure"
+#line 2632 "configure"
 #include "confdefs.h"
 #include <cln.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
-if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ginac_cv_lib_cln_link="-lcln"
 else
@@ -2644,11 +2658,12 @@ fi
     "fail")
         LIBS="${saved_LIBS}"
         echo "$ac_t""no" 1>&6
-        { echo "configure: error: You either need to set \$LDFLAGS or update CLN" 1>&2; exit 1; }
-    ;;
-    *)
-        LIBS="${saved_LIBS}"
-        echo "configure: warning: you found a bug in the configure script!" 1>&2
+        
+ginac_error_txt="$ginac_error_txt
+** I could not successfully link a test-program against libcln and run it.
+   You either need to set \$LDFLAGS or install/update the CLN library.
+"
+ginac_error=yes
     ;;
     esac
 
@@ -2661,7 +2676,7 @@ GINACLIB_LIBS=$LIBS
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2665: checking for $ac_word" >&5
+echo "configure:2680: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2697,7 +2712,7 @@ fi
 # Extract the first word of "latex", so it can be a program name with args.
 set dummy latex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2701: checking for $ac_word" >&5
+echo "configure:2716: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2733,7 +2748,7 @@ fi
 # Extract the first word of "makeindex", so it can be a program name with args.
 set dummy makeindex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2737: checking for $ac_word" >&5
+echo "configure:2752: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2769,7 +2784,7 @@ fi
 # Extract the first word of "dvips", so it can be a program name with args.
 set dummy dvips; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2773: checking for $ac_word" >&5
+echo "configure:2788: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2805,7 +2820,7 @@ fi
 # Extract the first word of "fig2dev", so it can be a program name with args.
 set dummy fig2dev; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2809: checking for $ac_word" >&5
+echo "configure:2824: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2841,13 +2856,13 @@ fi
 
 TUTORIAL_TARGETS=
 REFERENCE_TARGETS=
-if [ "x$enable_html_doc" = "xyes" ]; then
+if test "x${enable_html_doc}" = "xyes"; then
   TUTORIAL_TARGETS="$TUTORIAL_TARGETS ginac.html"
   if [ "$DOXYGEN" ]; then
     REFERENCE_TARGETS="$REFERENCE_TARGETS index.html"
   fi
 fi
-if [ "x$enable_ps_doc" = "xyes" ]; then
+if test "x${enable_ps_doc}" = "xyes"; then
   TUTORIAL_TARGETS="$TUTORIAL_TARGETS ginac.ps"
   if [ "$DOXYGEN" ]; then
     REFERENCE_TARGETS="$REFERENCE_TARGETS reference.ps"
@@ -2858,12 +2873,12 @@ fi
 
 LIBGINACCINT=
 GINACCINTDIR=
-if [ "x$with_cint" != "xno" ]; then
-  if [ "x$enable_static" != "xyes" ]; then
+if test "x$with_cint" != "xno"; then
+  if test "x$enable_static" != "xyes"; then
     { echo "configure: error: currently GiNaC-cint needs to build a static libginac" 1>&2; exit 1; }
   fi
-  if [ "x$with_cint" = "xyes" ]; then
-    if [ "x$CINTSYSDIR" = "x" ]; then
+  if test "x$with_cint" = "xyes"; then
+    if test "x$CINTSYSDIR" = "x"; then
       { echo "configure: error: please export \$CINTSYSDIR or specify --with-cint=CINTSYSDIR" 1>&2; exit 1; }
     fi
   else
@@ -2873,7 +2888,7 @@ if [ "x$with_cint" != "xno" ]; then
   # Extract the first word of "cint", so it can be a program name with args.
 set dummy cint; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2877: checking for $ac_word" >&5
+echo "configure:2892: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CINT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2909,7 +2924,7 @@ fi
   # Extract the first word of "makecint", so it can be a program name with args.
 set dummy makecint; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2913: checking for $ac_word" >&5
+echo "configure:2928: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKECINT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2946,7 +2961,7 @@ fi
     echo "$ac_t""creating cint/Makefile" 1>&6
     (cd cint && \
     $MAKECINT -mk Makefile.makecint -o ginaccint.bin -m \
-      -D OBSCURE_CINT_HACK -D NO_NAMESPACE_GINAC \
+      -D OBSCURE_CINT_HACK -D CINT_CONVERSION_WORKAROUND -D NO_NAMESPACE_GINAC \
       -I .. -I $CINTSYSDIR -m -H ../ginac/ginac.h dummies.h \
       -C++ dummies.cpp -C++ ginaccint.bin.cpp \
       -l ./libginac.a -lcln -cint -M0x10; \
@@ -3402,4 +3417,23 @@ chmod +x $CONFIG_STATUS
 rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
-echo "Configuration done. Now type \"make\"."
+
+if test "x${ginac_error}" = "xyes"; then
+  echo "**** The following problems have been detected by configure."
+  echo "**** Please check the messages below before running \"make\"."
+  echo "**** (see the section 'Common Problems' in the INSTALL file)"
+  echo "$ginac_error_txt"
+  if test "x${ginac_warning_txt}" != "x"; then
+    echo "${ginac_warning_txt}"
+  fi
+  echo "deleting cache ${cache_file}"
+  rm -f $cache_file
+  else 
+    if test x$ginac_warning = xyes; then
+      echo "=== The following minor problems have been detected by configure."
+      echo "=== Please check the messages below before running \"make\"."
+      echo "=== (see the section 'Common Problems' in the INSTALL file)"
+      echo "$ginac_warning_txt"
+    fi
+  echo "Configuration of GiNaC $VERSION done. Now type \"make\"."
+fi