X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=222befe8a5e178aeee586d956ee79b6f7ac1e87e;hp=b8afe39aa0e35564be011de5901a057e4584f3d0;hb=d7213923067aa49922962a469a691c3ec951064d;hpb=28b9b51a346dede84c8baee6ed96a328e97d1796 diff --git a/configure b/configure index b8afe39a..222befe8 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 @@ -893,6 +899,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 @@ -1058,6 +1106,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 @@ -1069,5 +1120,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 "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak