Make gfio build with --build-static
We can't build the gtk app statically, so filter out the static part
for just that. Fix up the Makefile so that fio doesn't include
all the gtk libs as well.
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/configure b/configure
index aaad70e..5e5596d 100755
--- a/configure
+++ b/configure
@@ -1010,6 +1010,8 @@
}
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
@@ -1023,7 +1025,7 @@
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"
@@ -1033,6 +1035,7 @@
echo "Please install gtk and gdk libraries"
gfio="no"
fi
+LDFLAGS=$ORG_LDFLAGS
fi
if test "$gfio_check" = "yes" ; then
@@ -1578,6 +1581,7 @@
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