diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-01 18:20:18 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-06-01 18:20:18 +0000 |
commit | a68ffae9e6c0accaa925972ec9d222f4e3340339 (patch) | |
tree | cbd97af5c95c1c8279b669f94e0f2b1253f1d518 /gdb/configure | |
parent | 89dc0afdc93f3688377cab4c5ddae1630e8d50eb (diff) | |
download | gdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.zip gdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.tar.gz gdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.tar.bz2 |
gdb/
* configure.ac (development): Define new variable.
Call AC_CHECK_LIB for mcheck if $development.
(ERROR_ON_WARNING): Enable it by default only if $development.
* config.in: Regenerate.
* configure: Regenerate.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/gdb/configure b/gdb/configure index f638268..6e92ddf 100755 --- a/gdb/configure +++ b/gdb/configure @@ -7034,6 +7034,48 @@ fi +if $development; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 +$as_echo_n "checking for main in -lmcheck... " >&6; } +if test "${ac_cv_lib_mcheck_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmcheck $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mcheck_main=yes +else + ac_cv_lib_mcheck_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 +$as_echo "$ac_cv_lib_mcheck_main" >&6; } +if test "x$ac_cv_lib_mcheck_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMCHECK 1 +_ACEOF + + LIBS="-lmcheck $LIBS" + +fi + +fi + # Generate jit-reader.h # This is typedeffed to GDB_CORE_ADDR in jit-reader.h @@ -12300,8 +12342,8 @@ if test "${enable_werror+set}" = set; then : fi -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then ERROR_ON_WARNING=yes fi @@ -12805,7 +12847,7 @@ $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works - # against Tcl.framework installed in an arbitary location. + # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then @@ -12920,7 +12962,7 @@ $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works - # against Tk.framework installed in an arbitary location. + # against Tk.framework installed in an arbitrary location. case ${TK_DEFS} in *TK_FRAMEWORK*) if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |