;;
--build-32bit-win) build_32bit_win="yes"
;;
+ --build-static) build_static="yes"
+ ;;
--enable-gfio)
gfio_check="yes"
;;
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"
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"
fi
echo "Rados Block Device engine $rbd"
+##########################################
+# check for rbd_invaidate_cache()
+rbd_inval="no"
+if test "$rbd" = "yes"; then
+cat > $TMPC << EOF
+#include <rbd/librbd.h>
+
+int main(int argc, char **argv)
+{
+ rbd_image_t image;
+
+ return rbd_invalidate_cache(image);
+}
+EOF
+if compile_prog "" "-lrbd -lrados" "rbd"; then
+ rbd_inval="yes"
+fi
+echo "rbd_invalidate_cache $rbd_inval"
+fi
+
##########################################
# Check whether we have setvbuf
setvbuf="no"
##########################################
# check for gfapi fadvise support
+if test "$gfapi" = "yes" ; then
gf_fadvise="no"
cat > $TMPC << EOF
#include <glusterfs/api/glfs.h>
return 0;
}
EOF
-
if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
gf_fadvise="yes"
fi
echo "Gluster API use fadvise $gf_fadvise"
+fi
+
+##########################################
+# check for gfapi trim support
+gf_trim="no"
+if test "$gfapi" = "yes" ; then
+cat > $TMPC << EOF
+#include <glusterfs/api/glfs.h>
+
+int main(int argc, char **argv)
+{
+ return glfs_discard_async(NULL, 0, 0);
+}
+EOF
+if compile_prog "" "-lgfapi -lglusterfs" "gf trim"; then
+ gf_trim="yes"
+fi
+echo "Gluster API trim support $gf_trim"
+fi
##########################################
# Check if we support stckf on s390
yacc_is_bison="no"
lex="no"
arith="no"
+if test "$targetos" != "SunOS" ; then
LEX=$(which lex 2> /dev/null)
if test -x "$LEX" ; then
lex="yes"
return 0;
}
EOF
-
if compile_prog "" "-ll" "lex"; then
LIBS="-ll $LIBS"
else
arith="no"
fi
fi
+fi
echo "lex/yacc for arithmetic $arith"
if test "$rbd" = "yes" ; then
output_sym "CONFIG_RBD"
fi
+if test "$rbd_inval" = "yes" ; then
+ output_sym "CONFIG_RBD_INVAL"
+fi
if test "$setvbuf" = "yes" ; then
output_sym "CONFIG_SETVBUF"
fi
if test "$gf_fadvise" = "yes" ; then
output_sym "CONFIG_GF_FADVISE"
fi
+if test "$gf_trim" = "yes" ; then
+ output_sym "CONFIG_GF_TRIM"
+fi
if test "$libhdfs" = "yes" ; then
output_sym "CONFIG_LIBHDFS"
fi
echo "LIBS+=$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