diff --git a/configure b/configure index 209808c0a6..240be9af24 100755 --- a/configure +++ b/configure @@ -2272,6 +2272,10 @@ fi fi +if test x"$no_x" = xyes; then + { echo "configure: error: Can not find X11 development headers or libraries." 1>&2; exit 1; } +fi + # This is how to use the variables set by AC_PATH_XTRA: # cc @X_CFLAGS@ -c -o foo.o foo.c @@ -2366,7 +2370,7 @@ fi # the XmHTML widget needs libz, libjpeg, libpng and libm # it also uses #ifdef's not #if's so DONT #def to zero. echo $ac_n "checking for deflateEnd in -lz""... $ac_c" 1>&6 -echo "configure:2370: checking for deflateEnd in -lz" >&5 +echo "configure:2374: checking for deflateEnd in -lz" >&5 ac_lib_var=`echo z'_'deflateEnd | 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 +2378,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2393: \"$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 @@ -2409,7 +2413,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:2413: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:2417: checking for jpeg_read_scanlines in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_read_scanlines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2417,7 +2421,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2436: \"$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 @@ -2452,7 +2456,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:2456: checking for png_read_image in -lpng" >&5 +echo "configure:2460: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2460,7 +2464,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2479: \"$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 @@ -2501,7 +2505,7 @@ fi # LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS" echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6 -echo "configure:2505: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:2509: checking for XpmReadFileToXpmImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2509,7 +2513,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm -L$x_libraries -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2528: \"$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 @@ -2551,7 +2555,7 @@ fi # Don't build the xmhtml source if user already has it installed... # this is ugly, there must be a nicer way of setting this up ... echo $ac_n "checking for XmHTMLTextScrollToLine in -lXmHTML""... $ac_c" 1>&6 -echo "configure:2555: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 +echo "configure:2559: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 ac_lib_var=`echo XmHTML'_'XmHTMLTextScrollToLine | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2559,7 +2563,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXmHTML $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS $X_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2578: \"$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 @@ -2601,21 +2605,19 @@ fi # is building GnuCash for people who might not have it). # See if the header file can be found. -for ac_hdr in nana.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2609: checking for $ac_hdr" >&5 +ac_safe=`echo "nana.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for nana.h""... $ac_c" 1>&6 +echo "configure:2611: checking for nana.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:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2621: \"$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* @@ -2631,18 +2633,14 @@ 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 +{ echo "configure: error: Can not find nana.h -- do you have nana installed?" 1>&2; exit 1; } fi -done echo $ac_n "checking for L_buffer_create in -lnana""... $ac_c" 1>&6 -echo "configure:2646: checking for L_buffer_create in -lnana" >&5 +echo "configure:2644: checking for L_buffer_create in -lnana" >&5 ac_lib_var=`echo nana'_'L_buffer_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2650,7 +2648,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnana $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2663: \"$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 @@ -2686,9 +2684,11 @@ EOF else echo "$ac_t""no" 1>&6 +{ echo "configure: error: Can not find a valid nana library -- do you have nana installed?" 1>&2; exit 1; } fi + ### -------------------------------------------------------------------------- # If readline exists, just assume that guile needs it. It probably does. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 diff --git a/configure.in b/configure.in index dcd73bec92..a00addabca 100644 --- a/configure.in +++ b/configure.in @@ -140,8 +140,11 @@ LIBS="$LIBS -lm" # This allows us to be careful about libarary ordering, in case that's # important. -AC_PATH_X AC_PATH_XTRA +if test x"$no_x" = xyes; then + AC_ERROR([Can not find X11 development headers or libraries.]) +fi + # This is how to use the variables set by AC_PATH_XTRA: # cc @X_CFLAGS@ -c -o foo.o foo.c @@ -241,8 +244,11 @@ AC_SUBST(XMHTML_INC) # is building GnuCash for people who might not have it). # See if the header file can be found. -AC_CHECK_HEADERS(nana.h) -AC_CHECK_LIB(nana, L_buffer_create) +AC_CHECK_HEADER(nana.h, , + AC_MSG_ERROR([Can not find nana.h -- do you have nana installed?])) +AC_CHECK_LIB(nana, L_buffer_create, , + AC_MSG_ERROR([Can not find a valid nana library -- do you have nana installed?])) + ### -------------------------------------------------------------------------- # If readline exists, just assume that guile needs it. It probably does.