mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Neil Henning <misc@duskborn.com>
To: musl@lists.openwall.com
Subject: Patch to allow configure out-with source directory
Date: Wed, 04 Mar 2015 09:25:39 +0000	[thread overview]
Message-ID: <54F6CF93.7010206@duskborn.com> (raw)

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 <float.h>' > "$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"



             reply	other threads:[~2015-03-04  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  9:25 Neil Henning [this message]
2015-03-04 16:41 ` Rich Felker
2015-03-04 16:52   ` Neil Henning
2015-03-04 16:52   ` Laurent Bercot
2015-03-04 17:45     ` Rich Felker
2015-03-04 23:53       ` Szabolcs Nagy
2015-03-05  0:02         ` Laurent Bercot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F6CF93.7010206@duskborn.com \
    --to=misc@duskborn.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).