diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 41 |
1 files changed, 25 insertions, 16 deletions
@@ -22,6 +22,7 @@ Fine tuning of the installation directories: --libexecdir=DIR package-scoped executables [EPREFIX/libexec] --libdir=DIR static library files [PREFIX/lib/$package] --includedir=DIR C header files [PREFIX/include] + --tmpfsdir=DIR assume the initial tmpfs will be mounted on DIR [/run] If no --prefix option is given, by default libdir (but not dynlibdir) will be /usr/lib/$package, and includedir will be /usr/include. @@ -40,11 +41,13 @@ Optional features: --disable-static do not build static libraries [enabled] --disable-allstatic do not prefer linking against static libraries [enabled] --enable-static-libc make entirely static binaries [disabled] - --enable-all-pic build everything as PIC [enabled iff toolchain builds PIE] + --disable-all-pic do not build executables or static libs as PIC [enabled] --enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled] --enable-absolute-paths do not rely on PATH to access this package's binaries, hardcode absolute BINDIR/foobar paths instead [disabled] + --enable-utmps link against the utmps library [disabled] + EOF exit 0 } @@ -143,7 +146,7 @@ sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false shared=false static=true -allpic=detect +allpic=true slashpackage=false abspath=false sproot= @@ -157,6 +160,8 @@ addlibdpath='' vpaths='' vpathd='' build= +tmpfsdir=/run +utmps=false for arg ; do case "$arg" in @@ -187,6 +192,9 @@ for arg ; do --disable-slashpackage) sproot= ; slashpackage=false ;; --enable-absolute-paths|--enable-absolute-paths=yes) abspath=true ;; --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;; + --tmpfsdir=*) tmpfsdir=${arg#*=} ;; + --enable-utmps|--enable-utmps=yes) utmps=true ;; + --disable-utmps|--enable-utmps=no) utmps=false ;; --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;; --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; @@ -303,20 +311,6 @@ if [ "x$target" != "x$(cat $sysdeps/target)" ] ; then exit 1 fi -if test $allpic = detect ; then - echo "Checking whether we need to build everything as PIC..." - if $CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -dM -E - < /dev/null | grep -qF __PIE__ ; then - allpic=true - echo " ... yes" - else - allpic=false - echo " ... no" - fi -fi -if $allpic ; then - tryflag CFLAGS_AUTO -fPIC -fi - spawn_lib=$(cat $sysdeps/spawn.lib) socket_lib=$(cat $sysdeps/socket.lib) sysclock_lib=$(cat $sysdeps/sysclock.lib) @@ -324,6 +318,9 @@ tainnow_lib=$(cat $sysdeps/tainnow.lib) timer_lib=$(cat $sysdeps/timer.lib) util_lib=$(cat $sysdeps/util.lib) +if $allpic ; then + tryflag CPPFLAGS_AUTO -fPIC +fi tryflag CFLAGS_AUTO -std=c99 tryflag CFLAGS -fomit-frame-pointer tryflag CFLAGS_AUTO -fno-exceptions @@ -434,6 +431,11 @@ if $allpic ; then else echo "STATIC_LIBS_ARE_PIC :=" fi +if $utmps ; then + echo "LIBUTMPS := -lutmps" +else + echo "LIBUTMPS :=" +fi exec 1>&3 3>&- echo " ... done." @@ -462,6 +464,13 @@ else echo "#define ${package_macro_name}_EXTBINPREFIX \"\"" fi echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\"" +echo "#define ${package_macro_name}_TMPFS \"$tmpfsdir\"" +echo +if $utmps ; then + echo "#define ${package_macro_name}_HAS_UTMPS" +else + echo "#undef ${package_macro_name}_HAS_UTMPS" +fi echo echo "#endif" exec 1>&3 3>&- |