X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=1ca461dd739d3cd27b142b214dbdca34f0ce2d7d;hp=09ea2761df9aba981ab286a77e71caf07cbfdd77;hb=22f80458a520d0c5371c64bf91d24cdd21dff825;hpb=d686990a3c4bf23823d78c9b69196b24028491ee diff --git a/configure b/configure index 09ea2761..1ca461dd 100755 --- a/configure +++ b/configure @@ -129,8 +129,10 @@ cpu="" cross_prefix=${cross_prefix-${CROSS_COMPILE}} cc="${CC-${cross_prefix}gcc}" +# default options show_help="no" exit_val=0 +gfio="no" # parse options for opt do @@ -144,9 +146,12 @@ for opt do ;; --build-32bit-win=*) build_32bit_win="$optarg" ;; - --help) - show_help="yes" + --enable-gfio) + gfio="yes" ;; + --help) + show_help="yes" + ;; *) echo "Bad option $opt" show_help="yes" @@ -159,6 +164,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= Specify yes for a 32-bit build on Windows" + echo "--enable-gfio Enable building of gtk gfio" exit $exit_val fi @@ -389,6 +395,28 @@ else fi echo "Wordsize $wordsize" +########################################## +# zlib probe +zlib="no" +cat > $TMPC < +int main(void) +{ + z_stream stream; + if (inflateInit(&stream) != Z_OK) + return 1; + return 0; +} +EOF +if compile_prog "" "-lz" "zlib" ; then + zlib=yes + LIBS="-lz $LIBS" +else + feature_not_found "zlib" + zlib=no +fi +echo "zlib $zlib" + ########################################## # linux-aio probe libaio="no" @@ -927,6 +955,48 @@ fi echo "__thread $tls_thread" ########################################## +# Whether or not __thread is supported for TLS +if test "$gfio" = "yes" ; then + cat > $TMPC << EOF +#include +#include +#include +int main(void) +{ + gdk_threads_enter(); + gdk_threads_leave(); + + printf("%d", GTK_CHECK_VERSION(2, 18, 0)); +} +EOF +GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0) +if test "$?" != "0" ; then + echo "configure: gtk and gthread not found" + exit 1 +fi +GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0) +if test "$?" != "0" ; then + echo "configure: gtk and gthread not found" + exit 1 +fi +if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then + r=$($TMPE) + if test "$r" != "0" ; then + gfio="yes" + LIBS="$LIBS $GTK_LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + else + echo "GTK found, but need version 2.18 or higher" + gfio="no" + fi +else + echo "Please install gtk and gdk libraries" + gfio="no" +fi +fi + +echo "gfio $gfio" + # Check whether we have getrusage(RUSAGE_THREAD) rusage_thread="no" cat > $TMPC << EOF @@ -1095,6 +1165,9 @@ fi if test "$rusage_thread" = "yes" ; then output_sym "CONFIG_RUSAGE_THREAD" fi +if test "$gfio" = "yes" ; then + echo "CONFIG_GFIO=y" >> $config_host_mak +fi if test "$sched_idle" = "yes" ; then output_sym "CONFIG_SCHED_IDLE" fi @@ -1106,5 +1179,6 @@ if test "$rlimit_memlock" = "yes" ; then fi echo "LIBS+=$LIBS" >> $config_host_mak +echo "CFLAGS+=$CFLAGS" >> $config_host_mak echo "CC=$cc" >> $config_host_mak echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak