diff options
author | dillo <dillo> | 2002-10-02 22:20:49 +0000 |
---|---|---|
committer | dillo <dillo> | 2002-10-02 22:20:49 +0000 |
commit | be677aea2c5de0143dc0cd6d2dc3f943cbf24814 (patch) | |
tree | 3c1890bbe71723990197ee0883440833a23beb3a /sysutils/apcupsd/patches | |
parent | 6be76aab05e97ad45fa259d49eef67b6c6429cc4 (diff) | |
download | pkgsrc-be677aea2c5de0143dc0cd6d2dc3f943cbf24814.tar.gz |
get rid of autoconf build dependency by patching configure
Diffstat (limited to 'sysutils/apcupsd/patches')
-rw-r--r-- | sysutils/apcupsd/patches/patch-aj | 345 |
1 files changed, 345 insertions, 0 deletions
diff --git a/sysutils/apcupsd/patches/patch-aj b/sysutils/apcupsd/patches/patch-aj new file mode 100644 index 00000000000..b2aea7bc5cd --- /dev/null +++ b/sysutils/apcupsd/patches/patch-aj @@ -0,0 +1,345 @@ +$NetBSD: patch-aj,v 1.3 2002/10/02 22:20:50 dillo Exp $ + +--- configure.orig Thu Oct 3 00:16:21 2002 ++++ configure +@@ -804,8 +806,191 @@ else + CFLAGS= + fi + fi +- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:809: checking how to run the C preprocessor" >&5 ++ ac_ext=c ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ++cross_compiling=$ac_cv_prog_cc_cross ++ ++ ++echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ++echo "configure:819: checking how to run the C preprocessor" >&5 ++# On Suns, sometimes $CPP names a directory. ++if test -n "$CPP" && test -d "$CPP"; then ++ CPP= ++fi ++if test -z "$CPP"; then ++if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ # This must be in double quotes, not single quotes, because CPP may get ++ # substituted into the Makefile and "${CC-cc}" will confuse make. ++ CPP="${CC-cc} -E" ++ # On the NeXT, cc -E runs the code through the compiler's parser, ++ # not just through cpp. ++ cat > conftest.$ac_ext <<EOF ++#line 834 "configure" ++#include "confdefs.h" ++#include <assert.h> ++Syntax Error ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ CPP="${CC-cc} -E -traditional-cpp" ++ cat > conftest.$ac_ext <<EOF ++#line 851 "configure" ++#include "confdefs.h" ++#include <assert.h> ++Syntax Error ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ CPP="${CC-cc} -nologo -E" ++ cat > conftest.$ac_ext <<EOF ++#line 868 "configure" ++#include "confdefs.h" ++#include <assert.h> ++Syntax Error ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ : ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ CPP=/lib/cpp ++fi ++rm -f conftest* ++fi ++rm -f conftest* ++fi ++rm -f conftest* ++ ac_cv_prog_CPP="$CPP" ++fi ++ CPP="$ac_cv_prog_CPP" ++else ++ ac_cv_prog_CPP="$CPP" ++fi ++echo "$ac_t""$CPP" 1>&6 ++ ++echo $ac_n "checking for AIX""... $ac_c" 1>&6 ++echo "configure:899: checking for AIX" >&5 ++cat > conftest.$ac_ext <<EOF ++#line 901 "configure" ++#include "confdefs.h" ++#ifdef _AIX ++ yes ++#endif ++ ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "yes" >/dev/null 2>&1; then ++ rm -rf conftest* ++ echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF ++#define _ALL_SOURCE 1 ++EOF ++ ++else ++ rm -rf conftest* ++ echo "$ac_t""no" 1>&6 ++fi ++rm -f conftest* ++ ++ ++ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` ++echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ++echo "configure:924: checking for minix/config.h" >&5 ++if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <<EOF ++#line 929 "configure" ++#include "confdefs.h" ++#include <minix/config.h> ++EOF ++ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++{ (eval echo configure:934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++if test -z "$ac_err"; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++fi ++rm -f conftest* ++fi ++if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ MINIX=yes ++else ++ echo "$ac_t""no" 1>&6 ++MINIX= ++fi ++ ++if test "$MINIX" = yes; then ++ cat >> confdefs.h <<\EOF ++#define _POSIX_SOURCE 1 ++EOF ++ ++ cat >> confdefs.h <<\EOF ++#define _POSIX_1_SOURCE 2 ++EOF ++ ++ cat >> confdefs.h <<\EOF ++#define _MINIX 1 ++EOF ++ ++fi ++ ++echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 ++echo "configure:972: checking for POSIXized ISC" >&5 ++if test -d /etc/conf/kconfig.d && ++ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 ++then ++ echo "$ac_t""yes" 1>&6 ++ ISC=yes # If later tests want to check for ISC. ++ cat >> confdefs.h <<\EOF ++#define _POSIX_SOURCE 1 ++EOF ++ ++ if test "$GCC" = yes; then ++ CC="$CC -posix" ++ else ++ CC="$CC -Xp" ++ fi ++else ++ echo "$ac_t""no" 1>&6 ++ ISC= ++fi ++ ++ ++echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ++echo "configure:994: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -1062,7 +1247,7 @@ else + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +- ac_dummy="$PATH" ++ ac_dummy="$PATH:/sbin:/usr/sbin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then +@@ -1083,9 +1268,9 @@ fi + + test -n "$SHUTDOWN" && break + done +-test -n "$SHUTDOWN" || SHUTDOWN="echo 'ERROR: shutdown program not found !'" ++test -n "$SHUTDOWN" || SHUTDOWN="shutdown" + +-for ac_prog in ranlib true ++for ac_prog in ranlib + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +@@ -1124,7 +1309,7 @@ fi + + test -n "$RANLIB" && break + done +-test -n "$RANLIB" || RANLIB="echo 'ERROR: ranlib program not found !'" ++test -n "$RANLIB" || RANLIB="true" + + for ac_prog in wall + do +@@ -1165,7 +1350,7 @@ fi + + test -n "$WALL" && break + done +-test -n "$WALL" || WALL="echo 'ERROR: wall program not found !'" ++test -n "$WALL" || WALL="cat" + + + echo $ac_n "checking for strftime""... $ac_c" 1>&6 +@@ -2119,6 +2304,7 @@ EOF + else + echo "$ac_t""no" 1>&6 + EXTRASRC="$EXTRASRC \$(srcdir)/lib/getopt.c \$(srcdir)/lib/getopt1.c" ++ CPPFLAGS="-Ilib" + EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o" + fi + +@@ -4249,98 +4435,7 @@ if test $ac_cv_sys_restartable_syscalls + EOF + + fi +- echo $ac_n "checking for AIX""... $ac_c" 1>&6 +-echo "configure:4254: checking for AIX" >&5 +-cat > conftest.$ac_ext <<EOF +-#line 4256 "configure" +-#include "confdefs.h" +-#ifdef _AIX +- yes +-#endif +- +-EOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- egrep "yes" >/dev/null 2>&1; then +- rm -rf conftest* +- echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +-#define _ALL_SOURCE 1 +-EOF +- +-else +- rm -rf conftest* +- echo "$ac_t""no" 1>&6 +-fi +-rm -f conftest* +- +- echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +-echo "configure:4277: checking for POSIXized ISC" >&5 +-if test -d /etc/conf/kconfig.d && +- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +-then +- echo "$ac_t""yes" 1>&6 +- ISC=yes # If later tests want to check for ISC. +- cat >> confdefs.h <<\EOF +-#define _POSIX_SOURCE 1 +-EOF +- +- if test "$GCC" = yes; then +- CC="$CC -posix" +- else +- CC="$CC -Xp" +- fi +-else +- echo "$ac_t""no" 1>&6 +- ISC= +-fi +- ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +-echo "configure:4298: checking for minix/config.h" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 +-else +- cat > conftest.$ac_ext <<EOF +-#line 4303 "configure" +-#include "confdefs.h" +-#include <minix/config.h> +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +-if test -z "$ac_err"; then +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=yes" +-else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" +-fi +-rm -f conftest* +-fi +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- MINIX=yes +-else +- echo "$ac_t""no" 1>&6 +-MINIX= +-fi +- +-if test "$MINIX" = yes; then +- cat >> confdefs.h <<\EOF +-#define _POSIX_SOURCE 1 +-EOF +- +- cat >> confdefs.h <<\EOF +-#define _POSIX_1_SOURCE 2 +-EOF +- +- cat >> confdefs.h <<\EOF +-#define _MINIX 1 +-EOF +- +-fi +- # Check whether --enable-powerflute or --disable-powerflute was given. ++ # Check whether --enable-powerflute or --disable-powerflute was given. + if test "${enable_powerflute+set}" = set; then + enableval="$enable_powerflute" + echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 |