/[hyperestraier]/upstream/0.5.3/configure.in
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.5.3/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Wed Aug 3 15:25:48 2005 UTC (18 years, 9 months ago) by dpavlin
File size: 4834 byte(s)
import of upstream 0.5.3

1 # Source of configuration for Hyper Estraier
2
3
4
5 #================================================================
6 # Generic Settings
7 #================================================================
8
9
10 # Targets
11 AC_INIT(hyperestraier, 0.5.3)
12
13 # Export variables
14 LIBVER=2
15 LIBREV=0
16 PROTVER="0.9"
17 MYCFLAGS="-Wall -fPIC -fsigned-char -O2 -DNDEBUG"
18 MYCPPOPTS=""
19 MYLDOPTS=""
20 MYMTLIBS=""
21 MYSKLIBS=""
22 MYRUNPATH=""
23 MYPOSTCMD="true"
24
25 # Building paths
26 pathtmp="$PATH"
27 PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
28 PATH="$PATH:/usr/ccs/bin:/usr/ucb:$pathtmp"
29 LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
30 LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
31 CPATH="$HOME/include:/usr/local/include:$CPATH"
32 PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
33 export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
34 if type pkg-config > /dev/null 2>&1
35 then
36 PATH="$PATH:`pkg-config --variable=bindir qdbm`"
37 LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir qdbm`"
38 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir qdbm`"
39 CPATH="$CPATH:`pkg-config --variable=includedir qdbm`"
40 export PATH LIBRARY_PATH LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
41 fi
42
43
44
45 #================================================================
46 # Options
47 #================================================================
48
49
50 # Internal variables
51 enables=""
52 isregex=""
53
54 # Debug mode
55 AC_ARG_ENABLE(debug,
56 AC_HELP_STRING([--enable-debug], [build for debugging]))
57 if test "$enable_debug" = "yes"
58 then
59 MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g"
60 MYLDOPTS="-static"
61 enables="$enables (debug)"
62 fi
63
64 # Developping mode
65 AC_ARG_ENABLE(devel,
66 AC_HELP_STRING([--enable-devel], [build for development]))
67 if test "$enable_devel" = "yes"
68 then
69 MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -O2 -pipe"
70 MYPOSTCMD="sync ; sync"
71 enables="$enables (devel)"
72 fi
73
74 # Profiling mode
75 AC_ARG_ENABLE(profile,
76 AC_HELP_STRING([--enable-profile], [build for profiling]))
77 if test "$enable_profile" = "yes"
78 then
79 MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g -pg -O2 -Werror"
80 enables="$enables (profile)"
81 fi
82
83 # Static mode
84 AC_ARG_ENABLE(static,
85 AC_HELP_STRING([--enable-static], [link statically]))
86 if test "$enable_static" = "yes"
87 then
88 MYLDOPTS="-static"
89 enables="$enables (static)"
90 fi
91
92 dnl # Regular expressions
93 dnl AC_ARG_ENABLE(regex,
94 dnl AC_HELP_STRING([--enable-regex], [enable regular expressions]))
95 dnl if test "$enable_regex" = "yes"
96 dnl then
97 dnl MYCPPOPTS="$MYCPPOPTS -DMYREGEX"
98 dnl enables="$enables (regex)"
99 dnl isregex="yes"
100 dnl fi
101
102 # Messages
103 printf '#================================================================\n'
104 printf '# Configuring Hyper Estraier version %s%s.\n' "$PACKAGE_VERSION" "$enables"
105 printf '#================================================================\n'
106
107
108
109 #================================================================
110 # Checking Commands and Libraries
111 #================================================================
112
113
114 # C compiler
115 AC_PROG_CC
116
117 # Underlying libraries
118 AC_CHECK_LIB(c, main)
119 AC_CHECK_LIB(m, main)
120 AC_CHECK_LIB(iconv, main)
121 AC_CHECK_LIB(z, main)
122 AC_CHECK_LIB(qdbm, main)
123
124 # For libraries of pthreads
125 AC_CHECK_LIB(pthread, main, MYMTLIBS="-lpthread $MYMTLIBS",
126 AC_CHECK_LIB(c_r, main, MYMTLIBS="-lc_r $MYMTLIBS"))
127
128 # For libraries of socket
129 AC_CHECK_LIB(nsl, main, MYSKLIBS="-lnsl $MYSKLIBS")
130 AC_CHECK_LIB(socket, main, MYSKLIBS="-lsocket $MYSKLIBS")
131 AC_CHECK_LIB(resolv, main, MYSKLIBS="-lresolv $MYSKLIBS")
132
133 dnl # For regular expressions
134 dnl if test "$isregex" = "yes"
135 dnl then
136 dnl AC_CHECK_LIB(regex, main)
137 dnl fi
138
139 # Checking the version of QDBM with pkg-config
140 if type pkg-config > /dev/null 2>&1
141 then
142 printf 'checking the version of QDBM ... '
143 if pkg-config --atleast-version=1.8.29 qdbm
144 then
145 printf 'ok (%s)\n' `pkg-config --modversion qdbm`
146 MYCPPOPTS="$MYCPPOPTS -I`pkg-config --variable=includedir qdbm`"
147 MYLDOPTS="$MYLDOPTS -L`pkg-config --variable=libdir qdbm`"
148 MYRUNPATH="$MYRUNPATH:`pkg-config --variable=libdir qdbm`"
149 else
150 printf 'error (not installed or too old)\n'
151 exit 1
152 fi
153 fi
154
155
156
157 #================================================================
158 # Generic Settings
159 #================================================================
160
161
162 # Export variables
163 AC_SUBST(LIBVER)
164 AC_SUBST(LIBREV)
165 AC_SUBST(PROTVER)
166 AC_SUBST(MYCFLAGS)
167 AC_SUBST(MYCPPOPTS)
168 AC_SUBST(MYLDOPTS)
169 AC_SUBST(MYMTLIBS)
170 AC_SUBST(MYSKLIBS)
171 AC_SUBST(MYRUNPATH)
172 AC_SUBST(MYPOSTCMD)
173
174 # Targets
175 AC_OUTPUT(Makefile estconfig hyperestraier.pc)
176 chmod 755 estconfig
177
178 # Messages
179 printf '#================================================================\n'
180 printf '# Ready to make.\n'
181 printf '#================================================================\n'
182
183
184
185 # END OF FILE

  ViewVC Help
Powered by ViewVC 1.1.26