|
@ -1,7 +1,6 @@ |
|
|
diff -urN a/configure b/configure
|
|
|
|
|
|
--- a/configure 2019-03-03 22:17:03.000000000 +0900
|
|
|
|
|
|
+++ b/configure 2019-06-04 13:08:41.418919319 +0900
|
|
|
|
|
|
@@ -3,52 +3,7 @@
|
|
|
|
|
|
|
|
|
--- a/configure
|
|
|
|
|
|
+++ b/configure
|
|
|
|
|
|
@@ -3,66 +3,7 @@
|
|
|
# This configure script written by Brian Callahan <bcallah@openbsd.org> |
|
|
# This configure script written by Brian Callahan <bcallah@openbsd.org> |
|
|
# and released into the Public Domain. |
|
|
# and released into the Public Domain. |
|
|
|
|
|
|
|
@ -51,39 +50,46 @@ diff -urN a/configure b/configure |
|
|
- done
|
|
|
- done
|
|
|
- return 1
|
|
|
- return 1
|
|
|
-}
|
|
|
-}
|
|
|
|
|
|
-
|
|
|
|
|
|
-defaultcflagscheck() {
|
|
|
|
|
|
- cat << EOF > conftest.c
|
|
|
|
|
|
-int main(void){return 0;}
|
|
|
|
|
|
-EOF
|
|
|
|
|
|
- $cc $cflags -g -O2 -o conftest.o -c conftest.c > /dev/null 2>&1
|
|
|
|
|
|
- if [ $? -eq 0 ] ; then
|
|
|
|
|
|
- rm -f conftest conftest.o conftest.c
|
|
|
|
|
|
- return 1
|
|
|
|
|
|
- else
|
|
|
|
|
|
- rm -f conftest conftest.o conftest.c
|
|
|
|
|
|
- return 0
|
|
|
|
|
|
- fi
|
|
|
|
|
|
-}
|
|
|
+cc="$CC"
|
|
|
+cc="$CC"
|
|
|
|
|
|
|
|
|
fparselncheck() { |
|
|
fparselncheck() { |
|
|
cat << EOF > conftest.c |
|
|
cat << EOF > conftest.c |
|
|
@@ -214,18 +184,19 @@
|
|
|
|
|
|
|
|
|
@@ -229,20 +170,6 @@
|
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
-wflagcheck() {
|
|
|
-wflagcheck() {
|
|
|
+futimenscheck() {
|
|
|
|
|
|
cat << EOF > conftest.c |
|
|
|
|
|
|
|
|
- cat << EOF > conftest.c
|
|
|
-int main(void){return 0;}
|
|
|
-int main(void){return 0;}
|
|
|
+#include <sys/stat.h>
|
|
|
|
|
|
+#include <stddef.h>
|
|
|
|
|
|
+int main(void){futimens(0, NULL);return 0;}
|
|
|
|
|
|
EOF |
|
|
|
|
|
- $cc -w -o conftest conftest.c > /dev/null 2> conftest.err
|
|
|
|
|
|
- grep ':' conftest.err > /dev/null 2>&1
|
|
|
|
|
|
+ $cc $tflags -o conftest conftest.c > /dev/null 2>&1
|
|
|
|
|
|
if [ $? -eq 0 ] ; then |
|
|
|
|
|
- rm -f conftest conftest.err conftest.c
|
|
|
|
|
|
|
|
|
-EOF
|
|
|
|
|
|
- $cc $cflags -w -o conftest conftest.c > /dev/null 2>&1
|
|
|
|
|
|
- if [ $? -eq 0 ] ; then
|
|
|
|
|
|
- rm -f conftest conftest.o conftest.c
|
|
|
- return 1
|
|
|
- return 1
|
|
|
- else
|
|
|
- else
|
|
|
- rm -f conftest conftest.err conftest.c
|
|
|
|
|
|
+ rm -f conftest conftest.c
|
|
|
|
|
|
return 0 |
|
|
|
|
|
+ else
|
|
|
|
|
|
+ rm -f conftest conftest.c
|
|
|
|
|
|
+ return 1
|
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@@ -303,54 +274,9 @@
|
|
|
|
|
|
|
|
|
- rm -f conftest conftest.o conftest.c
|
|
|
|
|
|
- return 0
|
|
|
|
|
|
- fi
|
|
|
|
|
|
-}
|
|
|
|
|
|
-
|
|
|
|
|
|
# Option variables |
|
|
|
|
|
if [ ! -z "$PREFIX" ] ; then |
|
|
|
|
|
prefix="$PREFIX" |
|
|
|
|
|
@@ -327,79 +254,9 @@
|
|
|
ldflags="${ldflags}-static" |
|
|
ldflags="${ldflags}-static" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -97,9 +103,20 @@ diff -urN a/configure b/configure |
|
|
- echo "$cc"
|
|
|
- echo "$cc"
|
|
|
-fi
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-if [ "x$cflags" = "x-DREGEX" ] ; then
|
|
|
|
|
|
- printf "checking if the compiler accepts -g -O2... "
|
|
|
|
|
|
- defaultcflagscheck
|
|
|
|
|
|
- if [ $? -eq 0 ] ; then
|
|
|
|
|
|
- echo "no"
|
|
|
|
|
|
- else
|
|
|
|
|
|
- cflags="-g -O2 $cflags"
|
|
|
|
|
|
- echo "yes"
|
|
|
|
|
|
- fi
|
|
|
|
|
|
-fi
|
|
|
|
|
|
-
|
|
|
-printf "checking for -w compiler flag... "
|
|
|
-printf "checking for -w compiler flag... "
|
|
|
-wflagcheck
|
|
|
-wflagcheck
|
|
|
-if [ $? -ne 0 ] ; then
|
|
|
|
|
|
|
|
|
-if [ $? -eq 0 ] ; then
|
|
|
- echo "no"
|
|
|
- echo "no"
|
|
|
-else
|
|
|
-else
|
|
|
- cflags="$cflags -w"
|
|
|
- cflags="$cflags -w"
|
|
@ -107,7 +124,13 @@ diff -urN a/configure b/configure |
|
|
-fi
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
-printf "checking for OS... "
|
|
|
-printf "checking for OS... "
|
|
|
-libs='-lncursesw'
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
-if [ $terminfo -eq 0 ] ; then
|
|
|
|
|
|
- libs="-lncursesw"
|
|
|
|
|
|
-else
|
|
|
|
|
|
- libs=""
|
|
|
|
|
|
-fi
|
|
|
|
|
|
-
|
|
|
-os=`uname -s`
|
|
|
-os=`uname -s`
|
|
|
-echo "$os"
|
|
|
-echo "$os"
|
|
|
-
|
|
|
-
|
|
@ -117,7 +140,11 @@ diff -urN a/configure b/configure |
|
|
- ;;
|
|
|
- ;;
|
|
|
- "xDarwin")
|
|
|
- "xDarwin")
|
|
|
- cflags="$cflags -DMSG_NOSIGNAL=SO_NOSIGPIPE -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
- cflags="$cflags -DMSG_NOSIGNAL=SO_NOSIGPIPE -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
- libs="-lncurses -lutil"
|
|
|
|
|
|
|
|
|
- if [ $terminfo -eq 0 ] ; then
|
|
|
|
|
|
- libs="-lncurses -lutil"
|
|
|
|
|
|
- else
|
|
|
|
|
|
- libs="-lutil"
|
|
|
|
|
|
- fi
|
|
|
- ;;
|
|
|
- ;;
|
|
|
- "xFreeBSD")
|
|
|
- "xFreeBSD")
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
@ -128,7 +155,11 @@ diff -urN a/configure b/configure |
|
|
- ;;
|
|
|
- ;;
|
|
|
- "xNetBSD")
|
|
|
- "xNetBSD")
|
|
|
- cflags="$cflags -D_OPENBSD_SOURCE"
|
|
|
- cflags="$cflags -D_OPENBSD_SOURCE"
|
|
|
- libs="-lcurses -lutil"
|
|
|
|
|
|
|
|
|
- if [ $terminfo -eq 0 ] ; then
|
|
|
|
|
|
- libs="-lcurses -lutil"
|
|
|
|
|
|
- else
|
|
|
|
|
|
- libs="-lutil"
|
|
|
|
|
|
- fi
|
|
|
- ;;
|
|
|
- ;;
|
|
|
- "xDragonFly")
|
|
|
- "xDragonFly")
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
@ -141,13 +172,3 @@ diff -urN a/configure b/configure |
|
|
|
|
|
|
|
|
cat << EOF > config.h |
|
|
cat << EOF > config.h |
|
|
/* This file generated automatically by configure. */ |
|
|
/* This file generated automatically by configure. */ |
|
|
--- a/linux.h 2019-03-03 22:17:03.000000000 +0900
|
|
|
|
|
|
+++ b/linux.h 2019-06-04 13:45:21.787063324 +0900
|
|
|
|
|
|
@@ -7,6 +7,7 @@
|
|
|
|
|
|
#endif |
|
|
|
|
|
#include <sys/types.h> |
|
|
|
|
|
|
|
|
|
|
|
+#include <sys/stat.h>
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
|
|
|
|
|
|
|
/* Defines */ |
|
|
|