Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F6CF93.7010206@duskborn.com>
Date: Wed, 04 Mar 2015 09:25:39 +0000
From: Neil Henning <misc@...kborn.com>
To: musl@...ts.openwall.com
Subject: Patch to allow configure out-with source directory

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"

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.