From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7127 Path: news.gmane.org!not-for-mail From: Neil Henning Newsgroups: gmane.linux.lib.musl.general Subject: Patch to allow configure out-with source directory Date: Wed, 04 Mar 2015 09:25:39 +0000 Message-ID: <54F6CF93.7010206@duskborn.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1425461168 17309 80.91.229.3 (4 Mar 2015 09:26:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2015 09:26:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7140-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 04 10:26:04 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YT5Z4-0007jJ-BB for gllmg-musl@m.gmane.org; Wed, 04 Mar 2015 10:26:02 +0100 Original-Received: (qmail 24530 invoked by uid 550); 4 Mar 2015 09:25:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24485 invoked from network); 4 Mar 2015 09:25:54 -0000 X-Virus-Scanned: Debian amavisd-new at mfilter25-d.gandi.net X-Originating-IP: 217.43.71.126 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 Xref: news.gmane.org gmane.linux.lib.musl.general:7127 Archived-At: Hey (new to the list), Below is a patch to allow the running of configure out-with the source directory (basically just looks up the path to the configure script, and then bases the -I includes in the check steps on this path). Any questions please get in touch, Cheers, -Neil. > diff --git a/configure b/configure > index e80fdfb..eb6edfb 100755 > --- a/configure > +++ b/configure > @@ -108,6 +108,7 @@ fi > > # Beginning of actual script > > +SOURCE_DIR=$(cd "$(dirname "$0")" && pwd) > CFLAGS_C99FSE= > CFLAGS_AUTO= > CFLAGS_MEMOPS= > @@ -281,8 +282,8 @@ __attribute__((__may_alias__)) > #endif > x; > EOF > -if $CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include $CPPFLAGS $CFLAGS \ > - -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then > +if $CC $CFLAGS_C99FSE -I$SOURCE_DIR/arch/$ARCH -I$SOURCE_DIR/include \ > + $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then > printf "no\n" > else > printf "yes\n" > @@ -483,13 +484,15 @@ esac > # be dangerously incorrect because it depends on (1) the macros being > # correct, and (2) IEEE semantics. > # > + > printf "checking whether compiler's long double definition matches > float.h... " > echo '#include ' > "$tmpc" > echo '#if LDBL_MANT_DIG == 53' >> "$tmpc" > echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc" > echo '#endif' >> "$tmpc" > -if $CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include $CPPFLAGS $CFLAGS \ > - -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then > + > +if $CC $CFLAGS_C99FSE -I$SOURCE_DIR/arch/$ARCH -I$SOURCE_DIR/include \ > + $CPPFLAGS $CFLAGS -c -o /dev/null $tmpc ; then > printf "yes\n" > else > printf "no\n"