pkgsrc/math/pspp/patches/patch-ak
seb 778f7ad37b Bl3ify and use gmp from devel/gmp not the supplied and older one. This
fix build with gcc3. Note that the somewhat aging gmp autoconf test
had been removed wholesale.

Bump PKGREVISION.
2004-03-08 21:13:55 +00:00

364 lines
12 KiB
Text

$NetBSD: patch-ak,v 1.3 2004/03/08 21:13:55 seb Exp $
--- configure.orig 2000-01-08 01:36:11.000000000 +0000
+++ configure
@@ -1744,7 +1744,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -3567,16 +3567,20 @@ else
echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for mpf_get_str in -lgmp""... $ac_c" 1>&6
-echo "configure:3572: checking for mpf_get_str in -lgmp" >&5
-ac_lib_var=`echo gmp'_'mpf_get_str | sed 'y%./+-%__p_%'`
+LIBS="-lgmp $LIBS";GMP_SUBDIRS=;GMP_LIBS=
+
+
+
+echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:3576: checking for tgetent in -ltermcap" >&5
+ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lgmp $LIBS"
+LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3580 "configure"
+#line 3584 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3581,13 +3585,13 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char mpf_get_str();
+char tgetent();
int main() {
-mpf_get_str()
+tgetent()
; return 0; }
EOF
-if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3602,25 +3606,69 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="-lgmp $LIBS" GMP_SUBDIRS= GMP_LIBS=
+ LIBS="-ltermcap $LIBS" termcap=yes
else
echo "$ac_t""no" 1>&6
-GMP_SUBDIRS=gmp GMP_LIBS='$(GMP_LIBS)'
+termcap=no
fi
+if test "$termcap" = yes; then
+ for ac_hdr in termcap.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3621: checking for $ac_hdr" >&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 3626 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3631: \"$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
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIBTERMCAP 1
+EOF
+fi
-echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:3616: checking for tgetent in -lncurses" >&5
-ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for readline in -ledit""... $ac_c" 1>&6
+echo "configure:3664: checking for readline in -ledit" >&5
+ac_lib_var=`echo edit'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lncurses $LIBS"
+LIBS="-ledit $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3624 "configure"
+#line 3672 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3625,13 +3673,13 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char tgetent();
+char readline();
int main() {
-tgetent()
+readline()
; return 0; }
EOF
-if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3646,19 +3694,19 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="-lncurses $LIBS" termcap=yes
+ readlinelib=edit have_readline=yes
else
echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:3654: checking for tgetent in -ltermcap" >&5
-ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
+echo "configure:3702: checking for readline in -lreadline" >&5
+ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-ltermcap $LIBS"
+LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3662 "configure"
+#line 3710 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3663,13 +3711,13 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char tgetent();
+char readline();
int main() {
-tgetent()
+readline()
; return 0; }
EOF
-if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3684,16 +3732,17 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="-ltermcap $LIBS" termcap=yes
+ readlinelib=readline have_readline=yes
else
echo "$ac_t""no" 1>&6
-termcap=no
+readline=no
fi
fi
-if test "$termcap" = yes; then
- for ac_hdr in termcap.h
+if test "$have_readline" = yes; then
+ LIBS="-l$readlinelib $LIBS"
+ for ac_hdr in readline.h readline/readline.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -3734,21 +3783,19 @@ fi
done
cat >> confdefs.h <<\EOF
-#define HAVE_LIBTERMCAP 1
+#define HAVE_LIBREADLINE 1
EOF
-fi
-
-echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:3744: checking for readline in -lreadline" >&5
-ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for tilde_expand in -l$readlinelib""... $ac_c" 1>&6
+echo "configure:3791: checking for tilde_expand in -l$readlinelib" >&5
+ac_lib_var=`echo $readlinelib'_'tilde_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lreadline $LIBS"
+LIBS="-l$readlinelib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3752 "configure"
+#line 3799 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3753,13 +3800,13 @@ cat > conftest.$ac_ext <<EOF
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char readline();
+char tilde_expand();
int main() {
-readline()
+tilde_expand()
; return 0; }
EOF
-if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3774,69 +3821,24 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+ cat >> confdefs.h <<\EOF
+#define HAVE_TILDE_EXPAND 1
EOF
- LIBS="-lreadline $LIBS"
-
else
echo "$ac_t""no" 1>&6
fi
-if test "$ac_cv_lib_readline_readline" = yes; then
- for ac_hdr in readline/readline.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3795: checking for $ac_hdr" >&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 3800 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3805: \"$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
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- echo $ac_n "checking for add_history in -lreadline""... $ac_c" 1>&6
-echo "configure:3832: checking for add_history in -lreadline" >&5
-ac_lib_var=`echo readline'_'add_history | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for add_history in -l$readlinelib""... $ac_c" 1>&6
+echo "configure:3834: checking for add_history in -l$readlinelib" >&5
+ac_lib_var=`echo $readlinelib'_'add_history | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lreadline $LIBS"
+LIBS="-l$readlinelib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3840 "configure"
+#line 3842 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3909,7 +3911,7 @@ fi
fi
if test "$history" = yes; then
- for ac_hdr in readline/history.h
+ for ac_hdr in history.h readline/history.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -4367,7 +4369,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -5573,7 +5575,7 @@ fi
if test "$ac_cv_prog_gcc" = yes; then
- CFLAGS="-g -Wall -W -Wno-uninitialized -Wwrite-strings \
+ CFLAGS="$CFLAGS -g -Wall -W -Wno-uninitialized -Wwrite-strings \
-Wstrict-prototypes -Wpointer-arith"
if test "$CC_OPTIONS" != ""; then
CFLAGS="$CFLAGS $CC_OPTIONS"