gdb:
[deliverable/binutils-gdb.git] / gdb / configure
index 7f9c51ad9e129768fa8ae76595f4a33ed9bfb574..dd3d04cf939992213e83d1a7f6d8d67331baf6d4 100755 (executable)
@@ -975,6 +975,7 @@ with_tk
 with_x
 enable_sim
 enable_multi_ice
+enable_gdbserver
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1635,6 +1636,8 @@ Optional Features:
                           gcc is used
   --enable-sim            link gdb with simulator
   --enable-multi-ice      build the multi-ice-gdb-server
+  --enable-gdbserver      automatically build gdbserver (yes/no/auto, default
+                          is auto)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -10699,6 +10702,43 @@ $as_echo "${found_usable_python}" >&6; }
   elif test "${have_python_config}" != failed; then
     if test "${have_libpython}" = no; then
 
+  version=python2.7
+
+  new_CPPFLAGS=${python_includes}
+  new_LIBS="${python_libs} -lpython2.7"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
+$as_echo_n "checking for ${version}... " >&6; }
+  save_CPPFLAGS=$CPPFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+  LIBS="$LIBS $new_LIBS"
+  found_usable_python=no
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "${version}/Python.h"
+int
+main ()
+{
+Py_Initialize ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  have_libpython=${version}
+                  found_usable_python=yes
+else
+  CPPFLAGS=$save_CPPFLAGS
+                  LIBS=$save_LIBS
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
+$as_echo "${found_usable_python}" >&6; }
+
+    fi
+    if test "${have_libpython}" = no; then
+
   version=python2.6
 
   new_CPPFLAGS=${python_includes}
@@ -10809,7 +10849,11 @@ $as_echo "${found_usable_python}" >&6; }
 
     fi
   fi
-  if test "${have_libpython}" = python2.6; then
+  if test "${have_libpython}" = python2.7; then
+
+$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
+
+  elif test "${have_libpython}" = python2.6; then
 
 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
 
@@ -10877,6 +10921,7 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
   CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
+  CONFIG_INSTALL="$CONFIG_INSTALL install-python"
   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
 
   # Flags needed to compile Python code (taken from python-config --cflags).
@@ -12505,10 +12550,10 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 fi
 
 for ac_func in canonicalize_file_name realpath getrusage getuid \
-               getgid pipe poll pread64 sbrk setpgid setpgrp setsid \
+               getgid pipe poll pread64 resize_term sbrk setpgid setpgrp setsid \
                sigaction sigprocmask sigsetmask socketpair syscall \
-               ttrace wborder setlocale iconvlist libiconvlist btowc \
-               setrlimit getrlimit posix_madvise
+               ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
+               setrlimit getrlimit posix_madvise waitpid
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -14186,20 +14231,19 @@ $as_echo "$gdb_cv_bigtoc" >&6; }
   ;;
 esac
 
-if test "${gdb_native}" = yes; then
-   if test "$GCC" = "yes" ; then
-      # The dynamically loaded libthread_db needs access to symbols in the gdb
-      # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
-      # may not be supported there.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
 $as_echo_n "checking for the dynamic export flag... " >&6; }
-      old_LDFLAGS="$LDFLAGS"
-      # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
-      RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
-      LDFLAGS="$LDFLAGS $RDYNAMIC"
-      dynamic_list=false
-      if test "${have_libpython}" = no; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+dynamic_list=false
+if test "${gdb_native}" = yes; then
+   # The dynamically loaded libthread_db needs access to symbols in the gdb
+   # executable.  Older GNU ld supports --export-dynamic but --dynamic-list
+   # may not be supported there.
+   old_LDFLAGS="$LDFLAGS"
+   # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
+   RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
+   LDFLAGS="$LDFLAGS $RDYNAMIC"
+   if test "${have_libpython}" = no; then
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -14215,14 +14259,14 @@ if ac_fn_c_try_link "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-      else
-       # Workaround http://bugs.python.org/issue4434 where static
-       # libpythonX.Y.a would get its symbols required for
-       # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
-       # Problem does not happen for the recommended libpythonX.Y.so linkage.
-       old_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $PYTHON_CFLAGS"
-       if test "$cross_compiling" = yes; then :
+   else
+     # Workaround http://bugs.python.org/issue4434 where static
+     # libpythonX.Y.a would get its symbols required for
+     # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
+     # Problem does not happen for the recommended libpythonX.Y.so linkage.
+     old_CFLAGS="$CFLAGS"
+     CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+     if test "$cross_compiling" = yes; then :
   true
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14232,10 +14276,10 @@ int
 main ()
 {
 int err;
-            Py_Initialize ();
-            err = PyRun_SimpleString ("import itertools\n");
-            Py_Finalize ();
-            return err == 0 ? 0 : 1;
+          Py_Initialize ();
+          err = PyRun_SimpleString ("import itertools\n");
+          Py_Finalize ();
+          return err == 0 ? 0 : 1;
   ;
   return 0;
 }
@@ -14247,41 +14291,20 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-       CFLAGS="$old_CFLAGS"
-      fi
-      if $dynamic_list;then
-       found="-Wl,--dynamic-list"
-       RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
-      else
-       RDYNAMIC="-rdynamic"
-       LDFLAGS="$old_LDFLAGS $RDYNAMIC"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  found="-rdynamic"
+     CFLAGS="$old_CFLAGS"
+   fi
+   LDFLAGS="$old_LDFLAGS"
+fi
+if $dynamic_list; then
+  found="-Wl,--dynamic-list"
+  RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
 else
-  found="no"
-                    # Error on its usage by .mh file.
-                    RDYNAMIC="no-rdynamic-available"
+  found="-rdynamic"
+  RDYNAMIC="-rdynamic"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      fi
 
-      LDFLAGS="$old_LDFLAGS"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
 $as_echo "$found" >&6; }
-   fi
-fi
 
 
 if test ${build} = ${host} -a ${host} = ${target} ; then
@@ -15796,8 +15819,20 @@ if test "x$enable_multi_ice" = xyes; then
 
 fi
 
-# We only build gdbserver automatically in a native configuration.
-if test "$gdb_native" = "yes"; then
+# Check whether --enable-gdbserver was given.
+if test "${enable_gdbserver+set}" = set; then :
+  enableval=$enable_gdbserver; case "${enableval}" in
+  yes| no|auto) ;;
+  *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
+esac
+else
+  enable_gdbserver=auto
+fi
+
+
+# We only build gdbserver automatically in a native configuration, and
+# only if the user did not explicitly disable its build.
+if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
   if test "x$build_gdbserver" = xyes; then
@@ -15805,12 +15840,19 @@ $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
 $as_echo "yes" >&6; }
     subdirs="$subdirs gdbserver"
 
+    gdbserver_build_enabled=yes
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   fi
 fi
 
+# If the user explicitly request the gdbserver to be built, verify that
+# we were in fact able to enable it.
+if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
+  as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
+fi
+
 # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
 # to an empty version.
 
@@ -15849,7 +15891,7 @@ ac_config_links="$ac_config_links $ac_config_links_1"
 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
 
 
-ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
+ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile data-directory/Makefile"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -16616,6 +16658,7 @@ do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     ".gdbinit") CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
     "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
+    "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
This page took 0.036705 seconds and 4 git commands to generate.