Rename common to gdbsupport
[deliverable/binutils-gdb.git] / gdb / gdbserver / configure
index 043bc216e43ca0f7b2ae90ef7990062036f75d62..0c04fcc8ae6a52b51cce6fd457788493692cd60e 100755 (executable)
@@ -722,6 +722,7 @@ enable_option_checking
 enable_maintainer_mode
 enable_largefile
 enable_libmcheck
+enable_unit_tests
 with_ust
 with_ust_include
 with_ust_lib
@@ -1367,6 +1368,8 @@ Optional Features:
                           sometimes confusing) to the casual installer
   --disable-largefile     omit support for large files
   --enable-libmcheck      Try linking with -lmcheck if available
+  --enable-unit-tests     Enable the inclusion of unit tests when compiling
+                          GDB
   --enable-werror         treat compile warnings as errors
   --enable-build-warnings enable build-time compiler warnings if gcc is used
   --enable-gdb-build-warnings
@@ -5889,13 +5892,35 @@ fi
   fi
 
 
-if $development; then
-  srv_selftest_objs="common/selftest.o"
+
+# Check whether we will enable the inclusion of unit tests when
+# compiling GDB.
+#
+# The default value of this option changes depending whether we're on
+# development mode (in which case it's "true") or not (in which case
+# it's "false").
+# Check whether --enable-unit-tests was given.
+if test "${enable_unit_tests+set}" = set; then :
+  enableval=$enable_unit_tests; case "${enableval}" in
+  yes)  enable_unittests=true  ;;
+  no)   enable_unittests=false ;;
+  *)    as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
+esac
+else
+  enable_unittests=$development
+fi
+
+
+if $enable_unittests; then
 
 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
 
+
+  srv_selftest_objs="gdbsupport/selftest.o"
+
 fi
 
+
  case ${build_alias} in
   "") build_noncanonical=${build} ;;
   *) build_noncanonical=${build_alias} ;;
@@ -5933,7 +5958,7 @@ ac_config_commands="$ac_config_commands depdir"
 
 
 # Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch common"
+CONFIG_SRC_SUBDIR="arch gdbsupport"
 
 
 ac_config_commands="$ac_config_commands gdbdepdir"
@@ -6048,7 +6073,7 @@ fi
 # "gnulib", to avoid the problem of both GDB and GDBserver wanting to
 # build it in the same directory, when building in the source dir.
 
-  in_src="../gnulib"
+  in_src="../../gnulib"
   in_build="build-gnulib-gdbserver"
   in_extra_args="$gnulib_extra_configure_args"
 
@@ -7240,12 +7265,16 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
+-Wno-sign-compare -Wno-error=maybe-uninitialized \
 -Wno-mismatched-tags \
 -Wno-error=deprecated-register \
 -Wsuggest-override \
 -Wimplicit-fallthrough=3 \
--Wduplicated-cond"
+-Wduplicated-cond \
+-Wshadow=local \
+-Wdeprecated-copy \
+-Wdeprecated-copy-dtor \
+-Wredundant-move"
 
 case "${host}" in
   *-*-mingw32*)
@@ -7258,7 +7287,10 @@ case "${host}" in
     build_warnings="$build_warnings -Wno-unknown-pragmas"
     # Solaris 11 <unistd.h> marks vfork deprecated.
     build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
-  *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
+  *)
+    # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
+    # but there's a special case for this below.
+    build_warnings="$build_warnings -Wformat-nonliteral" ;;
 esac
 
 # Check whether --enable-build-warnings was given.
@@ -7314,6 +7346,12 @@ $as_echo_n "checking compiler warning flags... " >&6; }
        case $w in
        -Wno-*)
                wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
+        -Wformat-nonliteral)
+               # gcc requires -Wformat before -Wformat-nonliteral
+               # will work, so stick them together.
+               w="-Wformat $w"
+               wtest="$w"
+               ;;
        *)
                wtest=$w ;;
        esac
@@ -7382,11 +7420,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-case " $WARN_CFLAGS " in
-*" -Wmissing-prototypes "*)
-  WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-prototypes"
-  ;;
-esac
 
 old_LIBS="$LIBS"
 LIBS="$LIBS -ldl"
@@ -7859,7 +7892,7 @@ esac
 . ${srcdir}/configure.srv
 
 # Add in the common host objects.
-. ${srcdir}/../common/common.host
+. ${srcdir}/../gdbsupport/common.host
 srv_host_obs="$common_host_obs"
 
 if test "${srv_mingwce}" = "yes"; then
This page took 0.027672 seconds and 4 git commands to generate.