From: Richard Kreckel Date: Wed, 16 Feb 2000 17:56:47 +0000 (+0000) Subject: - Made configure warn a lot when readline-stuff couldn't be found. X-Git-Tag: release_0-5-2~1 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=ff50f412bb89eed2c78adffa0f390341753e8792 - Made configure warn a lot when readline-stuff couldn't be found. --- diff --git a/INSTALL b/INSTALL index cd6f55c7..86c720e0 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -Prerequisites +PREREQUISITES ============= GiNaC requires the CLN library by Bruno Haible, available at either @@ -21,7 +21,7 @@ distribution before trying to compile GiNaC-cint. (See section `Working with the Cint C++ interpreter' below.) -Installation +INSTALLATION ============ As with any autoconfiguring GNU software, installation is as easy as this: @@ -64,8 +64,11 @@ make | ~4m | ~6m | ~10m | building shared and static lib make check | ~2m | ~2m | ~7m | mostly due to compilation +COMMON PROBLEMS +=============== + Problems with CLN -================= +----------------- You should use at least CLN V1.0.3, since during the development of GiNaC various bugs have been discovered and fixed in earlier versions. @@ -74,6 +77,16 @@ added in V1.0.3 so it won't continue with earlier versions anyhow. Please install CLN properly on your system before continuing with GiNaC. +Problems with building ginsh +---------------------------- + +The most common reason why this doesn't succeed is the absence of +libreadline and/or the corresponding header files. Depending on what +your system/distribution is, you will have to install a package called +libreadline and maybe libreadline-dev. If your system's vendor +doesn't supply such packages, go to +and compile it yourself. After that it should work fine. + Working with the Cint C++ interpreter ===================================== diff --git a/acinclude.m4 b/acinclude.m4 index 655cb992..a343fd97 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -54,12 +54,51 @@ dnl linking failed: "fail") LIBS="${saved_LIBS}" AC_MSG_RESULT([no]) - AC_MSG_ERROR([You either need to set \$LDFLAGS or update CLN]) - ;; -dnl should never ever get here: - *) - LIBS="${saved_LIBS}" - AC_MSG_WARN([you found a bug in the configure script!]) + GINAC_ERROR([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.]) ;; esac ]) + +dnl Usage: GINAC_ERROR(message) +dnl This macro displays the warning "message" and sets the flag ginac_error +dnl to yes. +AC_DEFUN(GINAC_ERROR,[ +ginac_error_txt="$ginac_error_txt +** $1 +" +ginac_error=yes]) + +dnl Usage: GINAC_WARNING(message) +dnl This macro displays the warning "message" and sets the flag ginac_warning +dnl to yes. +AC_DEFUN(GINAC_WARNING,[ +ginac_warning_txt="$ginac_warning_txt +== $1 +" +ginac_warning=yes]) + +dnl Usage: GINAC_CHECK_ERRORS +dnl (preferably to be put at end of configure.in) +dnl This macro displays a warning message if GINAC_ERROR or GINAC_WARNING +dnl has occured previously. +AC_DEFUN(GINAC_CHECK_ERRORS,[ +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]) diff --git a/aclocal.m4 b/aclocal.m4 index aa6a57c6..d4cb399b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -66,16 +66,55 @@ dnl linking failed: "fail") LIBS="${saved_LIBS}" AC_MSG_RESULT([no]) - AC_MSG_ERROR([You either need to set \$LDFLAGS or update CLN]) - ;; -dnl should never ever get here: - *) - LIBS="${saved_LIBS}" - AC_MSG_WARN([you found a bug in the configure script!]) + GINAC_ERROR([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.]) ;; esac ]) +dnl Usage: GINAC_ERROR(message) +dnl This macro displays the warning "message" and sets the flag ginac_error +dnl to yes. +AC_DEFUN(GINAC_ERROR,[ +ginac_error_txt="$ginac_error_txt +** $1 +" +ginac_error=yes]) + +dnl Usage: GINAC_WARNING(message) +dnl This macro displays the warning "message" and sets the flag ginac_warning +dnl to yes. +AC_DEFUN(GINAC_WARNING,[ +ginac_warning_txt="$ginac_warning_txt +== $1 +" +ginac_warning=yes]) + +dnl Usage: GINAC_CHECK_ERRORS +dnl (preferably to be put at end of configure.in) +dnl This macro displays a warning message if GINAC_ERROR or GINAC_WARNING +dnl has occured previously. +AC_DEFUN(GINAC_CHECK_ERRORS,[ +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]) + # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, diff --git a/config.h.in b/config.h.in index f4d7fb17..38c796ab 100644 --- a/config.h.in +++ b/config.h.in @@ -36,12 +36,6 @@ /* Define if you have the header file. */ #undef HAVE_MAP -/* Define if you have the header file. */ -#undef HAVE_READLINE_HISTORY_H - -/* Define if you have the header file. */ -#undef HAVE_READLINE_READLINE_H - /* Define if you have the header file. */ #undef HAVE_SSTREAM diff --git a/configure b/configure index 4e16b9ab..66e27f1b 100755 --- 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 @@ -2270,21 +2270,19 @@ else fi done -for ac_hdr in readline/readline.h readline/history.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2278: checking for $ac_hdr" >&5 +ac_safe=`echo "readline/readline.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for readline/readline.h""... $ac_c" 1>&6 +echo "configure:2276: checking for readline/readline.h" >&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 < +#include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2286: \"$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* @@ -2300,19 +2298,57 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 + +ginac_warning_txt="$ginac_warning_txt +== I could not find the header file readline/readline.h (needed for ginsh). +" +ginac_warning=yes +fi + +ac_safe=`echo "readline/history.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for readline/history.h""... $ac_c" 1>&6 +echo "configure:2314: checking for readline/history.h" >&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 - +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2324: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : else echo "$ac_t""no" 1>&6 + +ginac_warning_txt="$ginac_warning_txt +== I could not find the header file readline/history.h (needed for ginsh). +" +ginac_warning=yes fi -done 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:2352: 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 +2356,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2374: \"$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 @@ -2359,6 +2395,11 @@ EOF else echo "$ac_t""no" 1>&6 + +ginac_warning_txt="$ginac_warning_txt +== I could not find libreadline (needed by ginsh). +" +ginac_warning=yes fi GINSH_LIBS=$LIBS @@ -2366,7 +2407,7 @@ 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:2411: 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 +2415,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lstdc++ $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2433: \"$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 +2461,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:2465: 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 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:2475: \"$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 +2502,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:2506: 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 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:2516: \"$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 +2544,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:2548: 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 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:2558: \"$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 +2581,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:2585: 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 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:2595: \"$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 +2626,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:2630: 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 +2635,14 @@ else case "${ac_cv_header_cln_cln_h}" in "yes") cat > conftest.$ac_ext < 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:2646: \"$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 +2655,14 @@ rm -f conftest* ;; *) cat > conftest.$ac_ext < 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:2666: \"$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 +2685,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 +2703,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:2707: 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 +2739,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:2743: 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 +2775,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:2779: 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 +2811,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:2815: 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 +2847,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:2851: 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 @@ -2873,7 +2915,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:2919: 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 +2951,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:2955: 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 @@ -3402,4 +3444,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 diff --git a/configure.in b/configure.in index 934a6b20..be24b7ec 100644 --- a/configure.in +++ b/configure.in @@ -19,9 +19,9 @@ dnl (don't we all *love* M4?)... 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 AC_SUBST(GINACLIB_MAJOR_VERSION) @@ -87,9 +87,13 @@ AC_LANG_CPLUSPLUS dnl Check for stuff needed for building the GiNaC interactive shell (ginsh). AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(readline/readline.h readline/history.h) +AC_CHECK_HEADER(readline/readline.h, , + GINAC_WARNING([I could not find the header file readline/readline.h (needed for ginsh).])) +AC_CHECK_HEADER(readline/history.h, , + GINAC_WARNING([I could not find the header file readline/history.h (needed for ginsh).])) save_LIBS=$LIBS -AC_CHECK_LIB(readline, readline) +AC_CHECK_LIB(readline, readline, , + GINAC_WARNING([I could not find libreadline (needed by ginsh).])) GINSH_LIBS=$LIBS LIBS=$save_LIBS AC_SUBST(GINSH_LIBS) @@ -103,7 +107,7 @@ dnl Make sure all the necessary new-style headers are installed on the system. dnl If one of them cannot be found the system is probably not ANSI-conform dnl enough so trying the .h-style headers is a waste of time. AC_CHECK_HEADERS(iostream vector map string list typeinfo iterator stdexcept algorithm, , - AC_MSG_ERROR(need to have ANSI compliant headers)) + AC_MSG_ERROR(need to have ANSI compliant headers)) AC_CHECK_HEADERS(sstream strstream) dnl We need to have Bruno Haible's CLN installed (macros are in acinclude.m4): @@ -194,4 +198,5 @@ doc/reference/Makefile cint/Makefile cint/ginaccint ], [chmod +x ginac-config cint/ginaccint]) -echo "Configuration done. Now type \"make\"." +dnl Display a final warning if there has been a GINAC_ERROR or a GINAC_WARNING +GINAC_CHECK_ERRORS