X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=892335b92b8a37b95ed166cac6d677aebdf10d72;hp=eefe28e8428c66ac7b8cb77711b18c4e6c314269;hb=cf8a46a75f38afe07ebf823210f95543999e3116;hpb=09603894ab972ef4e4b1409db205b52845dd4d6a diff --git a/configure b/configure index eefe28e8..892335b9 100755 --- a/configure +++ b/configure @@ -152,6 +152,8 @@ for opt do ;; --build-32bit-win) build_32bit_win="yes" ;; + --build-static) build_static="yes" + ;; --enable-gfio) gfio_check="yes" ;; @@ -163,6 +165,8 @@ for opt do ;; --enable-libhdfs) libhdfs="yes" ;; + --disable-shm) output_sym "CONFIG_NO_SHM" + ;; --help) show_help="yes" ;; @@ -178,6 +182,7 @@ if test "$show_help" = "yes" ; then echo "--cc= Specify compiler to use" echo "--extra-cflags= Specify extra CFLAGS to pass to compiler" echo "--build-32bit-win Enable 32-bit build on Windows" + echo "--build-static Build a static fio" echo "--esx Configure build options for esx" echo "--enable-gfio Enable building of gtk gfio" echo "--disable-numa Disable libnuma even if found" @@ -399,6 +404,16 @@ echo "Compiler $cc" echo "Cross compile $cross_compile" echo +########################################## +# See if we need to build a static build +if test "$build_static" = "yes" ; then + CFLAGS="$CFLAGS -ffunction-sections -fdata-sections" + LDFLAGS="$LDFLAGS -static -Wl,--gc-sections" +else + build_static="no" +fi +echo "Static build $build_static" + ########################################## # check for wordsize wordsize="0" @@ -872,7 +887,7 @@ cat > $TMPC << EOF int main(int argc, char **argv) { struct bitmask *mask = numa_parse_nodestring(NULL); - return 0; + return mask->size == 0; } EOF if compile_prog "" "" "libnuma api"; then @@ -997,6 +1012,8 @@ int main(void) } EOF GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0) +ORG_LDFLAGS=$LDFLAGS +LDFLAGS=$(echo $LDFLAGS | sed s/"-static"//g) if test "$?" != "0" ; then echo "configure: gtk and gthread not found" exit 1 @@ -1010,7 +1027,7 @@ if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then r=$($TMPE) if test "$r" != "0" ; then gfio="yes" - LIBS="$LIBS $GTK_LIBS" + GFIO_LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" else echo "GTK found, but need version 2.18 or higher" @@ -1020,6 +1037,7 @@ else echo "Please install gtk and gdk libraries" gfio="no" fi +LDFLAGS=$ORG_LDFLAGS fi if test "$gfio_check" = "yes" ; then @@ -1550,7 +1568,10 @@ if test "$gf_trim" = "yes" ; then fi if test "$libhdfs" = "yes" ; then output_sym "CONFIG_LIBHDFS" -fi + echo "JAVA_HOME=$JAVA_HOME" >> $config_host_mak + echo "FIO_LIBHDFS_INCLUDE=$FIO_LIBHDFS_INCLUDE" >> $config_host_mak + echo "FIO_LIBHDFS_LIB=$FIO_LIBHDFS_LIB" >> $config_host_mak + fi if test "$arith" = "yes" ; then output_sym "CONFIG_ARITHMETIC" if test "$yacc_is_bison" = "yes" ; then @@ -1565,6 +1586,8 @@ if test "$zlib" = "no" ; then fi echo "LIBS+=$LIBS" >> $config_host_mak +echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak +echo "LDFLAGS+=$LDFLAGS" >> $config_host_mak echo "CC=$cc" >> $config_host_mak echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak