From patchwork Tue Aug 19 03:32:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2430 Received: (qmail 2655 invoked by alias); 19 Aug 2014 03:36:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 2611 invoked by uid 89); 19 Aug 2014 03:36:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Aug 2014 03:36:00 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XJaDE-0004Qw-U9 from Yao_Qi@mentor.com ; Mon, 18 Aug 2014 20:35:56 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 18 Aug 2014 20:35:56 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Mon, 18 Aug 2014 20:35:55 -0700 Message-ID: <53F2C530.20001@codesourcery.com> Date: Tue, 19 Aug 2014 11:32:00 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" CC: Subject: Re: [PATCH] Regenerate gdb/configure (Re: Skip ld/lto tests if plugins is disabled for binutils?) References: <20140811075538.GE7047@bubble.grove.modra.org> <20140811125907.GF7047@bubble.grove.modra.org> <20140812044529.GI7047@bubble.grove.modra.org> <20140812131443.GM7047@bubble.grove.modra.org> <53F2BAE4.5020504@codesourcery.com> In-Reply-To: <53F2BAE4.5020504@codesourcery.com> X-IsSubscribed: yes On 08/19/2014 10:48 AM, Yao Qi wrote: > configure files were updated except GDB's. I run aclocal and autoconf > to update gdb/configure. > 2014-08-19 Yao Qi > > * configure: Regenerate. Ur, I should run autoreconf instead, and get gdb/config.in updated too. Here is the updated patch. diff --git a/gdb/config.in b/gdb/config.in index fb9b0cd..b853412 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -531,6 +531,9 @@ /* Define to 1 if you have the `wborder' function. */ #undef HAVE_WBORDER +/* Define to 1 if you have the header file. */ +#undef HAVE_WINDOWS_H + /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK diff --git a/gdb/configure b/gdb/configure index 874922d..0b992ed 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1482,7 +1482,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-plugins Enable support for plugins (defaults no) + --enable-plugins Enable support for plugins --disable-largefile omit support for large files --enable-targets=TARGETS alternative target configurations @@ -4090,15 +4090,46 @@ test -n "$target_alias" && # even in directories otherwise not depending on the $plugins option. -# Check whether --enable-plugins was given. + maybe_plugins=no + for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + maybe_plugins=yes +fi + +done + + for ac_header in windows.h +do : + ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default +" +if test "x$ac_cv_header_windows_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + maybe_plugins=yes +fi + +done + + + # Check whether --enable-plugins was given. if test "${enable_plugins+set}" = set; then : enableval=$enable_plugins; case "${enableval}" in - yes | "") plugins=yes ;; - no) plugins=no ;; - *) plugins=yes ;; - esac + no) plugins=no ;; + *) plugins=yes + if test "$maybe_plugins" != "yes" ; then + as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 + fi ;; + esac else - plugins=no + plugins=$maybe_plugins + fi