X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=1a75fa4830555f871f266b9c03e24e0d10595948;hp=8125fc3ccfb685ae0f8149b191a079121adfbc81;hb=adaa46d81bca50eb16a40fea47e42e3df4b7e2cd;hpb=3ba1ba7f3d0fde62817e3e0c2aa284759de96ec8 diff --git a/configure b/configure index 8125fc3c..1a75fa48 100755 --- a/configure +++ b/configure @@ -87,7 +87,7 @@ compile_object() { compile_prog() { local_cflags="$1" - local_ldflags="$2" + local_ldflags="$2 $LIBS" echo "Compiling test case $3" >> config.log do_cc $CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags } @@ -193,6 +193,7 @@ SunOS) if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then cpu="x86_64" fi + LIBS="-lnsl -lsocket" ;; CYGWIN*) echo "Forcing known good options on Windows" @@ -909,6 +910,23 @@ if compile_prog "" "" "TCP_NODELAY"; then fi echo "TCP_NODELAY $tcp_nodelay" +########################################## +# Check whether we have RLIMIT_MEMLOCK +rlimit_memlock="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + struct rlimit rl; + return getrlimit(RLIMIT_MEMLOCK, &rl); +} +EOF +if compile_prog "" "" "RLIMIT_MEMLOCK"; then + rlimit_memlock="yes" +fi +echo "RLIMIT_MEMLOCK $rlimit_memlock" + ############################################################################# echo "# Automatically generated by configure - do not modify" > $config_host_mak @@ -1017,6 +1035,9 @@ fi if test "$tcp_nodelay" = "yes" ; then output_sym "CONFIG_TCP_NODELAY" fi +if test "$rlimit_memlock" = "yes" ; then + output_sym "CONFIG_RLIMIT_MEMLOCK" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CC=$cc" >> $config_host_mak