Changeset ba2263a for configure.in


Ignore:
Timestamp:
07/30/10 14:47:27 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
bd1e5fc
Parents:
3c2ddf4
Message:
  • Add error message if no C++ compiler is available at configure time - we *could* do conditional compilation, I guess, but meh.
  • Added fix for old versions of gcc that do not support -Wextra
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r7b29593 rba2263a  
    3333dnl AC_GNU_SOURCE
    3434
     35AC_DEFUN([rw_PROG_CXX_WORKS],
     36[AC_REQUIRE([AC_PROG_CXX])dnl
     37AC_CACHE_CHECK([whether the C++ compiler works],
     38        [rw_cv_prog_cxx_works],
     39        [AC_LANG_PUSH([C++])
     40        AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
     41                [rw_cv_prog_cxx_works=yes],
     42                [rw_cv_prog_cxx_works=no])
     43        AC_LANG_POP([C++])])
     44])
     45
    3546
    3647AM_CONFIG_HEADER([config.h])
     
    3849AC_PROG_CC
    3950AC_PROG_CXX
     51rw_PROG_CXX_WORKS
     52
     53if test "$rw_cv_prog_cxx_works" = "no"; then
     54        AC_MSG_ERROR("Failed to find working C++ compiler")
     55fi
     56
     57
     58
    4059AC_PROG_INSTALL
    4160dnl AC_PROG_YACC
     
    7291        fi
    7392       
    74         CFLAGS="$CFLAGS -Wall -Wextra -Wmissing-prototypes -O2"
    75         CXXFLAGS="$CXXFLAGS -Wall -Wextra -O2"
     93        CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -O2"
     94        CXXFLAGS="$CXXFLAGS -Wall -O2"
    7695        LIBCFLAGS="$CFLAGS"
    7796        LIBCFLAGS="$LIBCFLAGS -DLT_BUILDING_DLL=1"
     
    8099       
    81100        if test "$vis" = "yes"; then
    82                 LIBCFLAGS="$LIBCFLAGS -fvisibility=hidden"
    83                 LIBCXXFLAGS="$CXXFLAGS -fvisibility=hidden"
     101                LIBCFLAGS="$LIBCFLAGS -Wextra -fvisibility=hidden"
     102                LIBCXXFLAGS="$CXXFLAGS -Wextra -fvisibility=hidden"
    84103        fi
    85104fi
Note: See TracChangeset for help on using the changeset viewer.