summaryrefslogtreecommitdiff
path: root/math/pspp/patches/patch-ad
blob: a365d28dec6b384192ee6a36b8a917486f9b9553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
$NetBSD: patch-ad,v 1.4 2004/03/08 21:13:55 seb Exp $

--- configure.in.orig	2000-01-02 04:05:50.000000000 +0000
+++ configure.in
@@ -41,28 +41,30 @@ fi
 AC_SUBST(LOCAL_CC)
 
 AC_CHECK_LIB(m, sin)
-AC_CHECK_LIB(gmp, mpf_get_str, 
-  LIBS="-lgmp $LIBS" GMP_SUBDIRS= GMP_LIBS=,
-  GMP_SUBDIRS=gmp GMP_LIBS='$(GMP_LIBS)')
+LIBS="-lgmp $LIBS";GMP_SUBDIRS=;GMP_LIBS=
 AC_SUBST(GMP_SUBDIRS)
 AC_SUBST(GMP_LIBS)
 
-AC_CHECK_LIB(ncurses, tgetent, LIBS="-lncurses $LIBS" termcap=yes,
-  AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes,
-               termcap=no))
+AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes,
+             termcap=no)
 if test "$termcap" = yes; then
   AC_CHECK_HEADERS(termcap.h)
   AC_DEFINE(HAVE_LIBTERMCAP)
 fi
 
-AC_CHECK_LIB(readline, readline)
-if test "$ac_cv_lib_readline_readline" = yes; then
-  AC_CHECK_HEADERS(readline/readline.h)
-  AC_CHECK_LIB(readline, add_history, history=yes,
+AC_CHECK_LIB(edit, readline, readlinelib=edit have_readline=yes,
+  AC_CHECK_LIB(readline, readline, readlinelib=readline have_readline=yes,
+    readline=no))
+if test "$have_readline" = yes; then
+  LIBS="-l$readlinelib $LIBS"
+  AC_CHECK_HEADERS(readline.h readline/readline.h)
+  AC_DEFINE(HAVE_LIBREADLINE)
+  AC_CHECK_LIB($readlinelib, tilde_expand, AC_DEFINE(HAVE_TILDE_EXPAND))
+  AC_CHECK_LIB($readlinelib, add_history, history=yes,
     AC_CHECK_LIB(history, add_history, LIBS="-lhistory" history=yes,
                  history=no))
   if test "$history" = yes; then
-    AC_CHECK_HEADERS(readline/history.h)
+    AC_CHECK_HEADERS(history.h readline/history.h)
     AC_DEFINE(HAVE_LIBHISTORY)
   fi
 fi
@@ -201,7 +203,7 @@ AC_PROG_LN_S
 
 dnl This must be after other tests so warnings don't provoke errors above.
 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"