mailing list of musl libc
 help / color / mirror / code / Atom feed
* Patch to allow configure out-with source directory
@ 2015-03-04  9:25 Neil Henning
  2015-03-04 16:41 ` Rich Felker
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Henning @ 2015-03-04  9:25 UTC (permalink / raw)
  To: musl

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"



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-05  0:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04  9:25 Patch to allow configure out-with source directory Neil Henning
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

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).