;;
--build-static) build_static="yes"
;;
- --enable-gfio)
- gfio_check="yes"
+ --enable-gfio) gfio_check="yes"
;;
--disable-numa) disable_numa="yes"
;;
# cross-compiling to one of these OSes then you'll need to specify
# the correct CPU with the --cpu option.
case $targetos in
-AIX)
+AIX|OpenBSD)
# Unless explicitly enabled, turn off lex.
+ # OpenBSD will hit syntax error when enabled.
if test -z "$disable_lex" ; then
disable_lex="yes"
else
##########################################
# POSIX pshared attribute probe
-posix_pshared="no"
+if test "$posix_pshared" != "yes" ; then
+ posix_pshared="no"
+fi
cat > $TMPC <<EOF
#include <unistd.h>
int main(void)
fi
cat > $TMPC << EOF
#include <time.h>
+#include <string.h>
int main(int argc, char **argv)
{
volatile clockid_t cid;
- memset(&cid, 0, sizeof(cid));
+ memset((void*)&cid, 0, sizeof(cid));
return 0;
}
EOF
gdk_threads_enter();
gdk_threads_leave();
- printf("%d", GTK_CHECK_VERSION(2, 18, 0));
+ return GTK_CHECK_VERSION(2, 18, 0) ? 0 : 1; /* 0 on success */
}
EOF
GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0)
exit 1
fi
if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then
- r=$($TMPE)
- if test "$r" != "0" ; then
+ $TMPE
+ if test "$?" = "0" ; then
gfio="yes"
GFIO_LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
echo "gtk 2.18 or higher $gfio"
fi
+##########################################
# Check whether we have getrusage(RUSAGE_THREAD)
if test "$rusage_thread" != "yes" ; then
rusage_thread="no"
int main(int argc, char **argv)
{
-
rados_t cluster;
rados_ioctx_t io_ctx;
const char pool[] = "rbd";
fi
echo "setvbuf $setvbuf"
+##########################################
# check for gfapi
if test "$gfapi" != "yes" ; then
gfapi="no"
int main(int argc, char **argv)
{
-
glfs_t *g = glfs_new("foo");
return 0;
# Report whether dev-dax engine is enabled
echo "NVML dev-dax engine $devdax"
+##########################################
# Check if we have lex/yacc available
yacc="no"
yacc_is_bison="no"
cat > $TMPC << EOF
#include <assert.h>
#include <stdlib.h>
-#undef offsetof
-#ifdef __compiler_offsetof
-#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-#else
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
+#include <stddef.h>
struct foo {
int a, b;
##########################################
# cuda probe
-cuda="no"
+if test "$cuda" != "yes" ; then
+ cuda="no"
+fi
cat > $TMPC << EOF
#include <cuda.h>
int main(int argc, char **argv)
return cuInit(0);
}
EOF
-if test "$enable_cuda" == "yes" && compile_prog "" "-lcuda" "cuda"; then
+if test "$enable_cuda" = "yes" && compile_prog "" "-lcuda" "cuda"; then
cuda="yes"
LIBS="-lcuda $LIBS"
fi
output_sym "CONFIG_RUSAGE_THREAD"
fi
if test "$gfio" = "yes" ; then
- echo "CONFIG_GFIO=y" >> $config_host_mak
+ output_sym "CONFIG_GFIO"
fi
if test "$esx" = "yes" ; then
output_sym "CONFIG_ESX"