summaryrefslogtreecommitdiff
blob: a3d14a91e1dbf116f4a96dd33682c8d70c9bf78d (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
https://sourceforge.net/tracker/index.php?func=detail&aid=2218879&group_id=605&atid=300605

=== modified file 'Makefile.in'
--- Makefile.in	2008-11-03 11:47:00 +0000
+++ Makefile.in	2008-11-03 14:01:26 +0000
@@ -58,7 +58,7 @@
 EXEEXT=@EXEEXT@
 
 CONF_DIR=@sysconfdir@/
-PLUGIN_DIR=${libexecdir}/
+PLUGIN_DIR=${libexecdir}
 DICT_DIR=${datadir}/
 
 CC=		@CC@
@@ -80,6 +80,8 @@
 
 LDFLAGS=        @LDFLAGS@ @LIBS@
 LIBOBJS=        @LIBOBJS@
+MAALIB=		@MAALIB@
+MAACPPFLAGS=	@MAACPPFLAGS@
 EXES=	 	dict dictd dictzip dictfmt
 
 all: $(EXES) $(LIBRARIES)
@@ -155,19 +157,19 @@
 endif
 
 %.o: %.c
-	$(LIBTOOL) --tag=CC --mode=compile $(CC) -c $(CFLAGS) $< -o $@
+	$(LIBTOOL) --tag=CC --mode=compile $(CC) -c $(CFLAGS) $(MAACPPFLAGS) $< -o $@
 %.o: %.cpp
-	$(LIBTOOL) --tag=CXX --mode=compile $(CXX) -c $(CFLAGS) $< -o $@
+	$(LIBTOOL) --tag=CXX --mode=compile $(CXX) -c $(CFLAGS) $(MAACPPFLAGS) $< -o $@
 
 %: %.o
 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ -static \
 		$(filter-out local_regex local_zlib local_libmaa, $^) \
-		$(OBJS) $(LDFLAGS) -lz
+		$(OBJS) $(LDFLAGS) $(MAALIB) -lz
 
 dictd: dictd.o
 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ -static \
 		$(filter-out local_regex local_zlib local_libmaa, $^) \
-		$(DBILIB) $(OBJS) $(LDFLAGS) -lz
+		$(DBILIB) $(OBJS) $(LDFLAGS) $(MAALIB) -lz
 
 include $(srcdir)/deps
 
@@ -197,14 +199,14 @@
 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ -module \
 		$(filter-out local_regex local_zlib local_libmaa, $(^:.o=.lo)) \
 		-rpath "${PLUGIN_DIR}" \
-		$(LDFLAGS) $(JUDYLIB)
+		$(LDFLAGS)
 
 dictdplugin_dbi.la : heap.o dictdplugin_dbi.o str.o \
                      plugins_common.o $(LIBOBJS)
 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ -module \
 		$(filter-out local_regex local_zlib local_libmaa, $(^:.o=.lo)) \
 		-rpath "${PLUGIN_DIR}" \
-		$(LDFLAGS) $(DBILIB) -ldl
+		$(LDFLAGS) -ldl
 
 .PHONY: plugins
 plugins: $(PLUGINS)

=== modified file 'configure.in'
--- configure.in	2008-11-03 11:47:00 +0000
+++ configure.in	2008-11-03 13:56:42 +0000
@@ -215,14 +215,14 @@
 echo Checking for libraries
 
 if test "$local_libmaa" = 0; then
-    AC_CHECK_LIB(maa,maa_shutdown,XLDFLAGS="$XLDFLAGS -lmaa",local_libmaa=1)
+    AC_CHECK_LIB(maa,maa_shutdown,MAALIB="-lmaa",local_libmaa=1)
 fi
 
 if test "$local_libmaa" = 1; then
     AC_MSG_CHECKING(for libmaa in local source tree)
     if test -d libmaa; then
-        XLDFLAGS="$XLDFLAGS -Llibmaa -lmaa"
-        XCPPFLAGS="$XCPPFLAGS -Ilibmaa"
+        MAALIB="-Llibmaa -lmaa"
+        MAACPPFLAGS="$XCPPFLAGS -Ilibmaa"
 
         AC_CONFIG_SUBDIRS(libmaa)
 
@@ -234,8 +234,21 @@
     fi
 fi
 
-AC_CHECK_LIB(Judy, JudySLNext, [JUDYLIB=-lJudy])
-AC_CHECK_LIB(dbi,  dbi_shutdown, [DBILIB=-ldbi])
+AC_ARG_WITH(dbi,
+[  --with-dbi              build libdbi plugin if possible (plugin support should be enabled)],
+[
+if test "x${withval}" != xno; then
+	AC_CHECK_LIB(dbi,  dbi_shutdown, [DBILIB=-ldbi])
+fi
+])
+
+AC_ARG_WITH(judy,
+[  --with-judy             build judy plugin if possible (plugin support should be enabled)],
+[
+if test "x${withval}" != xno; then
+	AC_CHECK_LIB(Judy, JudySLNext, [JUDYLIB=-lJudy])
+fi
+])
 
 AC_CHECK_LIB(socket,main)
 AC_CHECK_LIB(c,inet_ntoa,
@@ -364,12 +377,10 @@
 LIBEXECDIR=`eval3 $libexecdir`
 DATADIR=`eval3 $datadir`
 
-CPPFLAGS="$CPPFLAGS $XCPPFLAGS"
 CFLAGS="$CFLAGS $XCFLAGS"
 LDFLAGS="$LDFLAGS $XLDFLAGS"
 
 AC_SUBST(DICT_VERSION)
-AC_SUBST(CPPFLAGS)
 AC_SUBST(CFLAGS)
 AC_SUBST(USE_PLUGIN)
 AC_SUBST(EXEEXT)
@@ -380,6 +391,8 @@
 AC_SUBST(JUDYLIB)
 AC_SUBST(DBILIB)
 AC_SUBST(LIBTOOL)
+AC_SUBST(MAALIB)
+AC_SUBST(MAACPPFLAGS)
 
 AC_SUBST(SYSCONFDIR)
 AC_SUBST(BINDIR)