|
|
@ -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> |
|
|
|
# and released into the Public Domain. |
|
|
|
|
|
|
@ -51,39 +50,46 @@ diff -urN a/configure b/configure |
|
|
|
- done
|
|
|
|
- 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"
|
|
|
|
|
|
|
|
fparselncheck() { |
|
|
|
cat << EOF > conftest.c |
|
|
|
@@ -214,18 +184,19 @@
|
|
|
|
@@ -229,20 +170,6 @@
|
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
-wflagcheck() {
|
|
|
|
+futimenscheck() {
|
|
|
|
cat << EOF > conftest.c |
|
|
|
- cat << EOF > conftest.c
|
|
|
|
-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
|
|
|
|
- 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" |
|
|
|
fi |
|
|
|
|
|
|
@ -97,9 +103,20 @@ diff -urN a/configure b/configure |
|
|
|
- echo "$cc"
|
|
|
|
-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... "
|
|
|
|
-wflagcheck
|
|
|
|
-if [ $? -ne 0 ] ; then
|
|
|
|
-if [ $? -eq 0 ] ; then
|
|
|
|
- echo "no"
|
|
|
|
-else
|
|
|
|
- cflags="$cflags -w"
|
|
|
@ -107,7 +124,13 @@ diff -urN a/configure b/configure |
|
|
|
-fi
|
|
|
|
-
|
|
|
|
-printf "checking for OS... "
|
|
|
|
-libs='-lncursesw'
|
|
|
|
-
|
|
|
|
-if [ $terminfo -eq 0 ] ; then
|
|
|
|
- libs="-lncursesw"
|
|
|
|
-else
|
|
|
|
- libs=""
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
-os=`uname -s`
|
|
|
|
-echo "$os"
|
|
|
|
-
|
|
|
@ -117,7 +140,11 @@ diff -urN a/configure b/configure |
|
|
|
- ;;
|
|
|
|
- "xDarwin")
|
|
|
|
- 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")
|
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
@ -128,7 +155,11 @@ diff -urN a/configure b/configure |
|
|
|
- ;;
|
|
|
|
- "xNetBSD")
|
|
|
|
- cflags="$cflags -D_OPENBSD_SOURCE"
|
|
|
|
- libs="-lcurses -lutil"
|
|
|
|
- if [ $terminfo -eq 0 ] ; then
|
|
|
|
- libs="-lcurses -lutil"
|
|
|
|
- else
|
|
|
|
- libs="-lutil"
|
|
|
|
- fi
|
|
|
|
- ;;
|
|
|
|
- "xDragonFly")
|
|
|
|
- cflags="$cflags -D__dead=__dead2 -DLOGIN_NAME_MAX=MAXLOGNAME"
|
|
|
@ -141,13 +172,3 @@ diff -urN a/configure b/configure |
|
|
|
|
|
|
|
cat << EOF > config.h |
|
|
|
/* 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 */ |