Ignore:
Timestamp:
03/02/11 11:06:46 (14 years ago)
Author:
tbretz
Message:
Moved addition of compiler and linker flags from Makefile.am to configure.ac, added better readline support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/configure

    r10207 r10211  
    773773X_CFLAGS
    774774XMKMF
     775READLINE_INCLUDES
     776READLINE_LIBS
    775777PTHREAD_CFLAGS
    776778PTHREAD_LIBS
     
    958960enable_doxygen_ps
    959961enable_doxygen_pdf
     962with_readline
    960963with_x
    961964with_motif_includes
     
    16411644                          both]
    16421645  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
     1646  --with-readline[=dir]   Compile with readline/locate base dir
    16431647  --with-x                use the X Window System
    16441648  --with-motif-includes=DIR    Motif include files are in DIR
     
    42454249  lt_cv_nm_interface="BSD nm"
    42464250  echo "int some_variable = 0;" > conftest.$ac_ext
    4247   (eval echo "\"\$as_me:4247: $ac_compile\"" >&5)
     4251  (eval echo "\"\$as_me:4251: $ac_compile\"" >&5)
    42484252  (eval "$ac_compile" 2>conftest.err)
    42494253  cat conftest.err >&5
    4250   (eval echo "\"\$as_me:4250: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
     4254  (eval echo "\"\$as_me:4254: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    42514255  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    42524256  cat conftest.err >&5
    4253   (eval echo "\"\$as_me:4253: output\"" >&5)
     4257  (eval echo "\"\$as_me:4257: output\"" >&5)
    42544258  cat conftest.out >&5
    42554259  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     
    54575461*-*-irix6*)
    54585462  # Find out which ABI we are using.
    5459   echo '#line 5459 "configure"' > conftest.$ac_ext
     5463  echo '#line 5463 "configure"' > conftest.$ac_ext
    54605464  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    54615465  (eval $ac_compile) 2>&5
     
    73857389   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    73867390   -e 's:$: $lt_compiler_flag:'`
    7387    (eval echo "\"\$as_me:7387: $lt_compile\"" >&5)
     7391   (eval echo "\"\$as_me:7391: $lt_compile\"" >&5)
    73887392   (eval "$lt_compile" 2>conftest.err)
    73897393   ac_status=$?
    73907394   cat conftest.err >&5
    7391    echo "$as_me:7391: \$? = $ac_status" >&5
     7395   echo "$as_me:7395: \$? = $ac_status" >&5
    73927396   if (exit $ac_status) && test -s "$ac_outfile"; then
    73937397     # The compiler can only warn and ignore the option if not recognized
     
    77247728   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    77257729   -e 's:$: $lt_compiler_flag:'`
    7726    (eval echo "\"\$as_me:7726: $lt_compile\"" >&5)
     7730   (eval echo "\"\$as_me:7730: $lt_compile\"" >&5)
    77277731   (eval "$lt_compile" 2>conftest.err)
    77287732   ac_status=$?
    77297733   cat conftest.err >&5
    7730    echo "$as_me:7730: \$? = $ac_status" >&5
     7734   echo "$as_me:7734: \$? = $ac_status" >&5
    77317735   if (exit $ac_status) && test -s "$ac_outfile"; then
    77327736     # The compiler can only warn and ignore the option if not recognized
     
    78297833   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    78307834   -e 's:$: $lt_compiler_flag:'`
    7831    (eval echo "\"\$as_me:7831: $lt_compile\"" >&5)
     7835   (eval echo "\"\$as_me:7835: $lt_compile\"" >&5)
    78327836   (eval "$lt_compile" 2>out/conftest.err)
    78337837   ac_status=$?
    78347838   cat out/conftest.err >&5
    7835    echo "$as_me:7835: \$? = $ac_status" >&5
     7839   echo "$as_me:7839: \$? = $ac_status" >&5
    78367840   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    78377841   then
     
    78847888   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    78857889   -e 's:$: $lt_compiler_flag:'`
    7886    (eval echo "\"\$as_me:7886: $lt_compile\"" >&5)
     7890   (eval echo "\"\$as_me:7890: $lt_compile\"" >&5)
    78877891   (eval "$lt_compile" 2>out/conftest.err)
    78887892   ac_status=$?
    78897893   cat out/conftest.err >&5
    7890    echo "$as_me:7890: \$? = $ac_status" >&5
     7894   echo "$as_me:7894: \$? = $ac_status" >&5
    78917895   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    78927896   then
     
    1026810272  lt_status=$lt_dlunknown
    1026910273  cat > conftest.$ac_ext <<_LT_EOF
    10270 #line 10270 "configure"
     10274#line 10274 "configure"
    1027110275#include "confdefs.h"
    1027210276
     
    1036410368  lt_status=$lt_dlunknown
    1036510369  cat > conftest.$ac_ext <<_LT_EOF
    10366 #line 10366 "configure"
     10370#line 10370 "configure"
    1036710371#include "confdefs.h"
    1036810372
     
    1232012324   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1232112325   -e 's:$: $lt_compiler_flag:'`
    12322    (eval echo "\"\$as_me:12322: $lt_compile\"" >&5)
     12326   (eval echo "\"\$as_me:12326: $lt_compile\"" >&5)
    1232312327   (eval "$lt_compile" 2>conftest.err)
    1232412328   ac_status=$?
    1232512329   cat conftest.err >&5
    12326    echo "$as_me:12326: \$? = $ac_status" >&5
     12330   echo "$as_me:12330: \$? = $ac_status" >&5
    1232712331   if (exit $ac_status) && test -s "$ac_outfile"; then
    1232812332     # The compiler can only warn and ignore the option if not recognized
     
    1241912423   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1242012424   -e 's:$: $lt_compiler_flag:'`
    12421    (eval echo "\"\$as_me:12421: $lt_compile\"" >&5)
     12425   (eval echo "\"\$as_me:12425: $lt_compile\"" >&5)
    1242212426   (eval "$lt_compile" 2>out/conftest.err)
    1242312427   ac_status=$?
    1242412428   cat out/conftest.err >&5
    12425    echo "$as_me:12425: \$? = $ac_status" >&5
     12429   echo "$as_me:12429: \$? = $ac_status" >&5
    1242612430   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1242712431   then
     
    1247112475   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1247212476   -e 's:$: $lt_compiler_flag:'`
    12473    (eval echo "\"\$as_me:12473: $lt_compile\"" >&5)
     12477   (eval echo "\"\$as_me:12477: $lt_compile\"" >&5)
    1247412478   (eval "$lt_compile" 2>out/conftest.err)
    1247512479   ac_status=$?
    1247612480   cat out/conftest.err >&5
    12477    echo "$as_me:12477: \$? = $ac_status" >&5
     12481   echo "$as_me:12481: \$? = $ac_status" >&5
    1247812482   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1247912483   then
     
    1634116345
    1634216346
     16347
    1634316348ac_ext=c
    1634416349ac_cpp='$CPP $CPPFLAGS'
     
    1668516690
    1668616691
    16687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
    16688 $as_echo_n "checking for readline in -lreadline... " >&6; }
    16689 if test "${ac_cv_lib_readline_readline+set}" = set; then :
    16690   $as_echo_n "(cached) " >&6
    16691 else
    16692   ac_check_lib_save_LIBS=$LIBS
    16693 LIBS="-lreadline  $LIBS"
    16694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    16695 /* end confdefs.h.  */
    16696 
    16697 /* Override any GCC internal prototype to avoid an error.
    16698    Use char because int might match the return type of a GCC
    16699    builtin and then its argument prototype would still apply.  */
    16700 #ifdef __cplusplus
    16701 extern "C"
    16702 #endif
    16703 char readline ();
    16704 int
    16705 main ()
    16706 {
    16707 return readline ();
    16708   ;
    16709   return 0;
    16710 }
    16711 _ACEOF
    16712 if ac_fn_c_try_link "$LINENO"; then :
    16713   ac_cv_lib_readline_readline=yes
    16714 else
    16715   ac_cv_lib_readline_readline=no
    16716 fi
    16717 rm -f core conftest.err conftest.$ac_objext \
    16718     conftest$ac_exeext conftest.$ac_ext
    16719 LIBS=$ac_check_lib_save_LIBS
    16720 fi
    16721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
    16722 $as_echo "$ac_cv_lib_readline_readline" >&6; }
    16723 if test "x$ac_cv_lib_readline_readline" = x""yes; then :
    16724   cat >>confdefs.h <<_ACEOF
    16725 #define HAVE_LIBREADLINE 1
    16726 _ACEOF
    16727 
    16728   LIBS="-lreadline $LIBS"
    16729 
    16730 else
    16731 
    16732       echo "Error! libreadline not found in default libarary paths."
    16733       exit -1
    16734 
    16735 
    16736 fi
    16737 
    16738 for ac_header in readline/readline.h
    16739 do :
    16740   ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
    16741 if test "x$ac_cv_header_readline_readline_h" = x""yes; then :
    16742   cat >>confdefs.h <<_ACEOF
    16743 #define HAVE_READLINE_READLINE_H 1
    16744 _ACEOF
    16745 
    16746 else
    16747 
    16748       echo "Error! readline/readline.h not properly installed in default include path (maybe readline-dev missing)."
    16749       exit -1
    16750 
    16751 
    16752 fi
    16753 
    16754 done
    16755 
    16756 
     16692CPPFLAGS+=" "$PTHREAD_CFLAGS" "
     16693LDFLAGS+=" "$PTHREAD_CFLAGS" "
     16694
     16695
     16696
     16697
     16698
     16699
     16700
     16701# Check whether --with-readline was given.
     16702if test "${with_readline+set}" = set; then :
     16703  withval=$with_readline; if test "x$withval" = "xno" ; then
     16704      without_readline=yes
     16705    elif test "x$withval" != "xyes" ; then
     16706      with_arg="$withval/include:-L$withval/lib $withval/include/readline:-L$withval/lib"
     16707    fi
     16708fi
     16709
     16710
     16711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline.h" >&5
     16712$as_echo_n "checking for readline.h... " >&6; }
     16713
     16714  if test "x$without_readline" != "xyes"; then
     16715    for i in $with_arg \
     16716             /usr/include: \
     16717             /usr/local/include:-L/usr/local/lib \
     16718             /usr/freeware/include:-L/usr/freeware/lib32 \
     16719             /usr/pkg/include:-L/usr/pkg/lib \
     16720             /sw/include:-L/sw/lib \
     16721             /cw/include:-L/cw/lib \
     16722             /net/caladium/usr/people/piotr.nba/temp/pkg/include:-L/net/caladium/usr/people/piotr.nba/temp/pkg/lib \
     16723             /boot/home/config/include:-L/boot/home/config/lib; do
     16724
     16725      incl=`echo "$i" | sed 's/:.*//'`
     16726      lib=`echo "$i" | sed 's/.*://'`
     16727
     16728      if test -f $incl/readline/readline.h ; then
     16729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $incl/readline/readline.h" >&5
     16730$as_echo "$incl/readline/readline.h" >&6; }
     16731        READLINE_LIBS="$lib -lreadline"
     16732        if test "$incl" != "/usr/include"; then
     16733          READLINE_INCLUDES="-I$incl/readline -I$incl"
     16734        else
     16735          READLINE_INCLUDES="-I$incl/readline"
     16736        fi
     16737
     16738$as_echo "#define HAVE_READLINE 1" >>confdefs.h
     16739
     16740        have_readline=yes
     16741        break
     16742      elif test -f $incl/readline.h -a "x$incl" != "x/usr/include"; then
     16743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $incl/readline.h" >&5
     16744$as_echo "$incl/readline.h" >&6; }
     16745        READLINE_LIBS="$lib -lreadline"
     16746        READLINE_INCLUDES="-I$incl"
     16747
     16748$as_echo "#define HAVE_READLINE 1" >>confdefs.h
     16749
     16750        have_readline=yes
     16751        break
     16752      fi
     16753    done
     16754  fi
     16755
     16756  if test "x$have_readline" != "xyes"; then
     16757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
     16758$as_echo "not found" >&6; }
     16759  fi
     16760
     16761
     16762CPPFLAGS+=" "$READLINE_INCLUDES" "
     16763LDFLAGS+=" "$READLINE_LIBS" "
     16764
     16765#AC_CHECK_LIB(readline, readline, [],
     16766#   [
     16767#      echo "Error! libreadline not found in default libarary paths."
     16768#      exit -1
     16769#   ]
     16770#)
     16771#AC_CHECK_HEADERS(readline/readline.h, [],
     16772#   [
     16773#      echo "Error! readline/readline.h not properly installed in default include path (maybe readline-dev missing)."
     16774#      exit -1
     16775#   ]
     16776#)
     16777#
    1675716778
    1675816779for ac_header in panel.h
     
    1683216853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    1683316854
    16834 
    16835 ######################################################################
    16836 # pthread support
    16837 ######################################################################
    16838 
    16839 #AX_PTHREAD
    16840 #
    16841 #AC_CHECK_LIB(pthread,  pthread_create,
    16842 #   [],
    16843 #   [
    16844 #      echo "Error! libpthread not found in default libarary paths."
    16845 #      exit -1
    16846 #   ]
    16847 #)
    16848 #AC_CHECK_HEADERS(pthread.h, [],
    16849 #   [
    16850 #      echo "Error! pthread.h not properly installed in default include paths."
    16851 #      exit -1
    16852 #   ]
    16853 #)
    1685416855
    1685516856######################################################################
     
    1790117902
    1790217903
     17904CPPFLAGS+=" "$MOTIF_INCL" "
     17905LDFLAGS+=" "$MOTIF_LDFLAGS" "
     17906
     17907#AC_CHECK_HEADERS([Mrm/MrmAppl.h], [],
     17908#   [
     17909#      echo "Error! Mrm/MrmAppl.h not properly installed, needed to compile did (you need most probably lesstif2-dev)."
     17910#      exit -1
     17911#   ]
     17912#)
     17913
    1790317914######################################################################
    1790417915# MySQL(++) SUPPORT
     
    1806218073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1806318074
     18075
     18076LDFLAGS+=" -lmysqlpp "
    1806418077
    1806518078######################################################################
     
    1990619919#ax_boost_wave
    1990719920#ax_boost_wserialization
     19921
     19922LDFLAGS+=" -lboost_date_time"
     19923LDFLAGS+=" -lboost_filesystem"
     19924LDFLAGS+=" -lboost_program_options"
     19925LDFLAGS+=" -lboost_regex"
     19926LDFLAGS+=" -lboost_system"
     19927LDFLAGS+=" -lboost_thread "
    1990819928
    1990919929#AC_CHECK_HEADERS(
Note: See TracChangeset for help on using the changeset viewer.