blob: aecef3c0555e7c0b602d5153c2c3cb3237b6100f (
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
56
57
58
59
60
61
62
63
64
65
|
$NetBSD: patch-af,v 1.2 2003/08/04 15:34:21 jtb Exp $
--- stage0/configure.in.orig 2003-08-04 11:22:05.000000000 +0100
+++ stage0/configure.in 2003-08-04 11:22:10.000000000 +0100
@@ -56,7 +56,7 @@
GC=""
-LDX_FLAGS="-lm"
+LDX_FLAGS="$LDFLAGS -lm"
AC_CANONICAL_HOST
AC_C_BIGENDIAN
@@ -179,32 +179,12 @@
# if using readline library, add appropriate LDX flags
# should this a --with option? Better defaults?
-case "$enable_readline" in
- gnu | yes )
- rdln_dir=""
- for i in /lib /usr/lib /usr/local/lib $HOME/lib
- do if test -r $i/libreadline.a
- then rdln_dir=$i
- fi
- done
- if test -z "$rdln_dir"
- then echo "WARNING: could not find GNU readline library" >&2
- echo " may need to patch rshell/Makefile" >&2
- LDX_FLAGS="-lreadline $LDX_FLAGS"
- else LDX_FLAGS="-L$rdln_dir -lreadline $LDX_FLAGS"
- fi
- if test -r /usr/lib/libcur.a
- then LDX_FLAGS="$LDX_FLAGS -lcur"
- else if test -r /usr/lib/libtermcap.a
- then LDX_FLAGS="$LDX_FLAGS -ltermcap"
- fi
- fi
- RDLN="gnu" ;;
- "std" | "no" | "" )
- RDLN="std" ;;
- *)
- RDLN="$enable_readline" ;;
-esac
+AC_CHECK_LIB(readline, readline, RDLN="gnu", RDLN="std", -ltermcap)
+[
+if test "$RDLN" = "gnu"; then
+ ] LDX_FLAGS="$LDX_FLAGS -lreadline -ltermcap" [
+fi
+]
if test "$enable_dynamic_linking" = "" -a "$dl_default" = "yes"
then enable_dynamic_linking=yes
@@ -564,8 +544,10 @@
$(SO_PRODUCT): $(SOFILES)
$(CC) -shared $(SOFILES) -o $(SO_PRODUCT) $(XLFLAGS)
-%.so: %.c
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $^
+.SUFFIXES: .so
+
+.c.so:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o ${.TARGET} ${.IMPSRC}
install.so: $(SO_PRODUCT)
cp $(SO_PRODUCT) $(INSTALL_DIR)/resource/modules
|