Ignore:
Timestamp:
01/24/12 13:39:41 (13 years ago)
Author:
tbretz
Message:
Added a native check for the support of -std=c++0x; switched from O2 to O3; switched off debugging by default (use --enable-debug in configure to switch it on again); switched off some compiler warnings when compiling files using qwt headers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/configure

    r12490 r12756  
    10211021ac_user_opts='
    10221022enable_option_checking
     1023enable_optimization
     1024enable_debug
    10231025enable_static
    10241026enable_shared
     
    17311733  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
    17321734  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
     1735  --disable-optimization  Compile with -O0 instead of -O3
     1736
     1737  --enable-debug          Compile with debugging symbols (-g)
     1738
    17331739  --enable-static[=PKGS]  build static libraries [default=no]
    17341740  --enable-shared[=PKGS]  build shared libraries [default=yes]
     
    29682974
    29692975
     2976# Make sure none of the following will set -O2
     2977# Check whether --enable-optimization was given.
     2978if test "${enable_optimization+set}" = set; then :
     2979  enableval=$enable_optimization;
     2980fi
     2981
     2982if test "x$enable_optimization" != "xno"; then :
     2983  MYFLAGS+=" -O3"
     2984else
     2985  MYFLAGS+=" -O0"
     2986fi
     2987
     2988# Check whether --enable-debug was given.
     2989if test "${enable_debug+set}" = set; then :
     2990  enableval=$enable_debug;
     2991fi
     2992
     2993if test "x$enable_debug" = "xyes"; then :
     2994  MYFLAGS+=" -g"
     2995fi
     2996
     2997CFLAGS+=$MYFLAGS
     2998CXXFLAGS+=$MYFLAGS
     2999
    29703000ac_ext=c
    29713001ac_cpp='$CPP $CPPFLAGS'
     
    38233853ac_compiler_gnu=$ac_cv_c_compiler_gnu
    38243854
     3855
     3856#AC_PROG_CC_C99
    38253857   case $ac_cv_prog_cc_stdc in #(
    38263858  no) :
     
    41164148esac
    41174149
    4118 #AC_PROG_CC_C99
    41194150
    41204151######################################################################
    4121 # GNUC extension support (needed for the evnt builder)
     4152# GNUC extension support (needed for the event builder)
    41224153######################################################################
    41234154
     
    45814612
    45824613
     4614
     4615######################################################################
     4616# Check for right C++ standard
     4617######################################################################
     4618
     4619#AC_CXX_HEADER_STDCXX_0X
     4620
     4621
     4622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features without additional flags" >&5
     4623$as_echo_n "checking if g++ supports C++0x features without additional flags... " >&6; }
     4624if test "${ac_cv_cxx_compile_cxx0x_native+set}" = set; then :
     4625  $as_echo_n "(cached) " >&6
     4626else
     4627
     4628  ac_ext=cpp
     4629ac_cpp='$CXXCPP $CPPFLAGS'
     4630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     4633
     4634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4635/* end confdefs.h.  */
     4636
     4637  template <typename T>
     4638    struct check
     4639    {
     4640      static_assert(sizeof(int) <= sizeof(T), "not big enough");
     4641    };
     4642
     4643    typedef check<check<bool>> right_angle_brackets;
     4644
     4645    int a;
     4646    decltype(a) b;
     4647
     4648    typedef check<int> check_type;
     4649    check_type c;
     4650    check_type&& cr = c;
     4651int
     4652main ()
     4653{
     4654
     4655  ;
     4656  return 0;
     4657}
     4658_ACEOF
     4659if ac_fn_cxx_try_compile "$LINENO"; then :
     4660  ac_cv_cxx_compile_cxx0x_native=yes
     4661else
     4662  ac_cv_cxx_compile_cxx0x_native=no
     4663fi
     4664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4665  ac_ext=c
     4666ac_cpp='$CPP $CPPFLAGS'
     4667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4669ac_compiler_gnu=$ac_cv_c_compiler_gnu
     4670
     4671
     4672fi
     4673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_native" >&5
     4674$as_echo "$ac_cv_cxx_compile_cxx0x_native" >&6; }
     4675
     4676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=c++0x" >&5
     4677$as_echo_n "checking if g++ supports C++0x features with -std=c++0x... " >&6; }
     4678if test "${ac_cv_cxx_compile_cxx0x_cxx+set}" = set; then :
     4679  $as_echo_n "(cached) " >&6
     4680else
     4681
     4682  ac_ext=cpp
     4683ac_cpp='$CXXCPP $CPPFLAGS'
     4684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     4687
     4688  ac_save_CXXFLAGS="$CXXFLAGS"
     4689  CXXFLAGS="$CXXFLAGS -std=c++0x"
     4690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4691/* end confdefs.h.  */
     4692
     4693  template <typename T>
     4694    struct check
     4695    {
     4696      static_assert(sizeof(int) <= sizeof(T), "not big enough");
     4697    };
     4698
     4699    typedef check<check<bool>> right_angle_brackets;
     4700
     4701    int a;
     4702    decltype(a) b;
     4703
     4704    typedef check<int> check_type;
     4705    check_type c;
     4706    check_type&& cr = c;
     4707int
     4708main ()
     4709{
     4710
     4711  ;
     4712  return 0;
     4713}
     4714_ACEOF
     4715if ac_fn_cxx_try_compile "$LINENO"; then :
     4716  ac_cv_cxx_compile_cxx0x_cxx=yes
     4717else
     4718  ac_cv_cxx_compile_cxx0x_cxx=no
     4719fi
     4720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4721  CXXFLAGS="$ac_save_CXXFLAGS"
     4722  ac_ext=c
     4723ac_cpp='$CPP $CPPFLAGS'
     4724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4726ac_compiler_gnu=$ac_cv_c_compiler_gnu
     4727
     4728
     4729fi
     4730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_cxx" >&5
     4731$as_echo "$ac_cv_cxx_compile_cxx0x_cxx" >&6; }
     4732
     4733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=gnu++0x" >&5
     4734$as_echo_n "checking if g++ supports C++0x features with -std=gnu++0x... " >&6; }
     4735if test "${ac_cv_cxx_compile_cxx0x_gxx+set}" = set; then :
     4736  $as_echo_n "(cached) " >&6
     4737else
     4738
     4739  ac_ext=cpp
     4740ac_cpp='$CXXCPP $CPPFLAGS'
     4741ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4742ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4743ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     4744
     4745  ac_save_CXXFLAGS="$CXXFLAGS"
     4746  CXXFLAGS="$CXXFLAGS -std=gnu++0x"
     4747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4748/* end confdefs.h.  */
     4749
     4750  template <typename T>
     4751    struct check
     4752    {
     4753      static_assert(sizeof(int) <= sizeof(T), "not big enough");
     4754    };
     4755
     4756    typedef check<check<bool>> right_angle_brackets;
     4757
     4758    int a;
     4759    decltype(a) b;
     4760
     4761    typedef check<int> check_type;
     4762    check_type c;
     4763    check_type&& cr = c;
     4764int
     4765main ()
     4766{
     4767
     4768  ;
     4769  return 0;
     4770}
     4771_ACEOF
     4772if ac_fn_cxx_try_compile "$LINENO"; then :
     4773  ac_cv_cxx_compile_cxx0x_gxx=yes
     4774else
     4775  ac_cv_cxx_compile_cxx0x_gxx=no
     4776fi
     4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4778  CXXFLAGS="$ac_save_CXXFLAGS"
     4779  ac_ext=c
     4780ac_cpp='$CPP $CPPFLAGS'
     4781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     4782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     4783ac_compiler_gnu=$ac_cv_c_compiler_gnu
     4784
     4785
     4786fi
     4787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_gxx" >&5
     4788$as_echo "$ac_cv_cxx_compile_cxx0x_gxx" >&6; }
     4789
     4790  if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
     4791     test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
     4792     test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
     4793
     4794$as_echo "#define HAVE_STDCXX_0X /**/" >>confdefs.h
     4795
     4796  fi
     4797
     4798if test "$ac_cv_cxx_compile_cxx0x_cxx" != yes; then
     4799   as_fn_error $? "C++0x standard (-std=c++0x) not supported by compiler." "$LINENO" 5
     4800fi
     4801
     4802CXXFLAGS+=" -std=c++0x"
    45834803
    45844804######################################################################
     
    51365356  lt_cv_nm_interface="BSD nm"
    51375357  echo "int some_variable = 0;" > conftest.$ac_ext
    5138   (eval echo "\"\$as_me:5138: $ac_compile\"" >&5)
     5358  (eval echo "\"\$as_me:5358: $ac_compile\"" >&5)
    51395359  (eval "$ac_compile" 2>conftest.err)
    51405360  cat conftest.err >&5
    5141   (eval echo "\"\$as_me:5141: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
     5361  (eval echo "\"\$as_me:5361: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    51425362  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    51435363  cat conftest.err >&5
    5144   (eval echo "\"\$as_me:5144: output\"" >&5)
     5364  (eval echo "\"\$as_me:5364: output\"" >&5)
    51455365  cat conftest.out >&5
    51465366  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     
    63476567*-*-irix6*)
    63486568  # Find out which ABI we are using.
    6349   echo '#line 6349 "configure"' > conftest.$ac_ext
     6569  echo '#line 6569 "configure"' > conftest.$ac_ext
    63506570  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    63516571  (eval $ac_compile) 2>&5
     
    75087728
    75097729
    7510 
    75117730# Set options
    75127731# Check whether --enable-static was given.
     
    80088227   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    80098228   -e 's:$: $lt_compiler_flag:'`
    8010    (eval echo "\"\$as_me:8010: $lt_compile\"" >&5)
     8229   (eval echo "\"\$as_me:8229: $lt_compile\"" >&5)
    80118230   (eval "$lt_compile" 2>conftest.err)
    80128231   ac_status=$?
    80138232   cat conftest.err >&5
    8014    echo "$as_me:8014: \$? = $ac_status" >&5
     8233   echo "$as_me:8233: \$? = $ac_status" >&5
    80158234   if (exit $ac_status) && test -s "$ac_outfile"; then
    80168235     # The compiler can only warn and ignore the option if not recognized
     
    83478566   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    83488567   -e 's:$: $lt_compiler_flag:'`
    8349    (eval echo "\"\$as_me:8349: $lt_compile\"" >&5)
     8568   (eval echo "\"\$as_me:8568: $lt_compile\"" >&5)
    83508569   (eval "$lt_compile" 2>conftest.err)
    83518570   ac_status=$?
    83528571   cat conftest.err >&5
    8353    echo "$as_me:8353: \$? = $ac_status" >&5
     8572   echo "$as_me:8572: \$? = $ac_status" >&5
    83548573   if (exit $ac_status) && test -s "$ac_outfile"; then
    83558574     # The compiler can only warn and ignore the option if not recognized
     
    84528671   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    84538672   -e 's:$: $lt_compiler_flag:'`
    8454    (eval echo "\"\$as_me:8454: $lt_compile\"" >&5)
     8673   (eval echo "\"\$as_me:8673: $lt_compile\"" >&5)
    84558674   (eval "$lt_compile" 2>out/conftest.err)
    84568675   ac_status=$?
    84578676   cat out/conftest.err >&5
    8458    echo "$as_me:8458: \$? = $ac_status" >&5
     8677   echo "$as_me:8677: \$? = $ac_status" >&5
    84598678   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    84608679   then
     
    85078726   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    85088727   -e 's:$: $lt_compiler_flag:'`
    8509    (eval echo "\"\$as_me:8509: $lt_compile\"" >&5)
     8728   (eval echo "\"\$as_me:8728: $lt_compile\"" >&5)
    85108729   (eval "$lt_compile" 2>out/conftest.err)
    85118730   ac_status=$?
    85128731   cat out/conftest.err >&5
    8513    echo "$as_me:8513: \$? = $ac_status" >&5
     8732   echo "$as_me:8732: \$? = $ac_status" >&5
    85148733   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    85158734   then
     
    1089111110  lt_status=$lt_dlunknown
    1089211111  cat > conftest.$ac_ext <<_LT_EOF
    10893 #line 10893 "configure"
     11112#line 11112 "configure"
    1089411113#include "confdefs.h"
    1089511114
     
    1098711206  lt_status=$lt_dlunknown
    1098811207  cat > conftest.$ac_ext <<_LT_EOF
    10989 #line 10989 "configure"
     11208#line 11208 "configure"
    1099011209#include "confdefs.h"
    1099111210
     
    1294313162   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1294413163   -e 's:$: $lt_compiler_flag:'`
    12945    (eval echo "\"\$as_me:12945: $lt_compile\"" >&5)
     13164   (eval echo "\"\$as_me:13164: $lt_compile\"" >&5)
    1294613165   (eval "$lt_compile" 2>conftest.err)
    1294713166   ac_status=$?
    1294813167   cat conftest.err >&5
    12949    echo "$as_me:12949: \$? = $ac_status" >&5
     13168   echo "$as_me:13168: \$? = $ac_status" >&5
    1295013169   if (exit $ac_status) && test -s "$ac_outfile"; then
    1295113170     # The compiler can only warn and ignore the option if not recognized
     
    1304213261   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1304313262   -e 's:$: $lt_compiler_flag:'`
    13044    (eval echo "\"\$as_me:13044: $lt_compile\"" >&5)
     13263   (eval echo "\"\$as_me:13263: $lt_compile\"" >&5)
    1304513264   (eval "$lt_compile" 2>out/conftest.err)
    1304613265   ac_status=$?
    1304713266   cat out/conftest.err >&5
    13048    echo "$as_me:13048: \$? = $ac_status" >&5
     13267   echo "$as_me:13267: \$? = $ac_status" >&5
    1304913268   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1305013269   then
     
    1309413313   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1309513314   -e 's:$: $lt_compiler_flag:'`
    13096    (eval echo "\"\$as_me:13096: $lt_compile\"" >&5)
     13315   (eval echo "\"\$as_me:13315: $lt_compile\"" >&5)
    1309713316   (eval "$lt_compile" 2>out/conftest.err)
    1309813317   ac_status=$?
    1309913318   cat out/conftest.err >&5
    13100    echo "$as_me:13100: \$? = $ac_status" >&5
     13319   echo "$as_me:13319: \$? = $ac_status" >&5
    1310113320   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1310213321   then
     
    1407214291# Automake initial setup
    1407314292######################################################################
    14074 
    1407514293am__api_version='1.11'
    1407614294
     
    1488115099esac
    1488215100AM_BACKSLASH='\'
     15101
    1488315102
    1488415103if test "x$CC" != xcc; then
     
    1735717576
    1735817577
    17359 CPPFLAGS+=" "$PTHREAD_CFLAGS" "
    17360 LDFLAGS+=" "$PTHREAD_CFLAGS" "
     17578CPPFLAGS+=" "$PTHREAD_CFLAGS
     17579LDFLAGS+=" "$PTHREAD_CFLAGS
    1736117580
    1736217581
     
    1743217651fi
    1743317652
    17434 CPPFLAGS+=" "$READLINE_INCLUDES" "
    17435 LDFLAGS+=" "$READLINE_LIBS" "
     17653CPPFLAGS+=" "$READLINE_INCLUDES
     17654LDFLAGS+=" "$READLINE_LIBS
    1743617655
    1743717656# Needed to compile FACT++
     
    1854418763
    1854518764
    18546 CPPFLAGS+=" "$MOTIF_INCL" "
    18547 LDFLAGS+=" "$MOTIF_LDFLAGS" "
     18765CPPFLAGS+=" "$MOTIF_INCL
     18766LDFLAGS+=" "$MOTIF_LDFLAGS
    1854818767
    1854918768if test "$lt_cv_libxp" = "yes"; then
     
    1931519534
    1931619535
    19317 LDFLAGS+=" -lmysqlpp "
     19536LDFLAGS+=" -lmysqlpp"
    1931819537
    1931919538######################################################################
     
    2118021399LDFLAGS+=" "$BOOST_PROGRAM_OPTIONS_LIB
    2118121400LDFLAGS+=" "$BOOST_REGEX_LIB
    21182 LDFLAGS+=" "$BOOST_THREAD_LIB" "
    21183 
    21184 CPPFLAGS+=" "$BOOST_CPPFLAGS" "
     21401LDFLAGS+=" "$BOOST_THREAD_LIB
     21402
     21403CPPFLAGS+=" "$BOOST_CPPFLAGS
    2118521404
    2118621405#AC_CHECK_HEADERS(
     
    2238422603
    2238522604                cat > conftest.$ac_ext <<EOF
    22386 #line 22386 "configure"
     22605#line 22605 "configure"
    2238722606#include "confdefs.h"
    2238822607#include <qglobal.h>
     
    2303223251
    2303323252   ROOTCPPFLAGS=$ROOTCFLAGS" "$ROOTAUXCFLAGS
    23034    ROOTLDFLAGS="-L"$ROOTLIBDIR" -lGQt "
     23253   ROOTLDFLAGS="-L"$ROOTLIBDIR" -lGQt"
    2303523254
    2303623255   #AC_CHECK_PROG(HAVE_ROOT_QT, libGQt.so.$ROOTSOVERSION, yes, no, $ROOTLIBDIR)
     
    2609026309{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
    2609126310$as_echo "$as_me: " >&6;}
     26311{ $as_echo "$as_me:${as_lineno-$LINENO}:  CFLAGS   = $CFLAGS" >&5
     26312$as_echo "$as_me:  CFLAGS   = $CFLAGS" >&6;}
     26313{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
     26314$as_echo "$as_me: " >&6;}
     26315{ $as_echo "$as_me:${as_lineno-$LINENO}:  CXXFLAGS = $CXXFLAGS" >&5
     26316$as_echo "$as_me:  CXXFLAGS = $CXXFLAGS" >&6;}
     26317{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
     26318$as_echo "$as_me: " >&6;}
    2609226319{ $as_echo "$as_me:${as_lineno-$LINENO}:  CPPFLAGS = $CPPFLAGS" >&5
    2609326320$as_echo "$as_me:  CPPFLAGS = $CPPFLAGS" >&6;}
Note: See TracChangeset for help on using the changeset viewer.