Mercurial > vim
annotate src/configure.in @ 2303:6ebb886efe3c vim73
Filter out -pthread for cproto.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 11 Jul 2010 20:52:58 +0200 |
parents | 69064995302a |
children | 543ea69d037f |
rev | line source |
---|---|
7 | 1 dnl configure.in: autoconf script for Vim |
2 | |
3 dnl Process this file with autoconf 2.12 or 2.13 to produce "configure". | |
4 dnl Should also work with autoconf 2.54 and later. | |
5 | |
6 AC_INIT(vim.h) | |
7 AC_CONFIG_HEADER(auto/config.h:config.h.in) | |
8 | |
9 dnl Being able to run configure means the system is Unix (compatible). | |
10 AC_DEFINE(UNIX) | |
11 AC_PROG_MAKE_SET | |
12 | |
13 dnl Checks for programs. | |
14 AC_PROG_CC dnl required by almost everything | |
15 AC_PROG_CPP dnl required by header file checks | |
16 AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP | |
17 AC_ISC_POSIX dnl required by AC_C_CROSS | |
18 AC_PROG_AWK dnl required for "make html" in ../doc | |
19 | |
20 dnl Don't strip if we don't have it | |
21 AC_CHECK_PROG(STRIP, strip, strip, :) | |
22 | |
14 | 23 dnl Check for extension of executables |
7 | 24 AC_EXEEXT |
25 | |
1621 | 26 dnl Check for standard headers. We don't use this in Vim but other stuff |
27 dnl in autoconf needs it, where it uses STDC_HEADERS. | |
28 AC_HEADER_STDC | |
29 AC_HEADER_SYS_WAIT | |
30 | |
7 | 31 dnl Set default value for CFLAGS if none is defined or it's empty |
32 if test -z "$CFLAGS"; then | |
33 CFLAGS="-O" | |
34 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" | |
35 fi | |
36 if test "$GCC" = yes; then | |
819 | 37 dnl method that should work for nearly all versions |
38 gccversion=`"$CC" -dumpversion` | |
39 if test "x$gccversion" = "x"; then | |
40 dnl old method; fall-back for when -dumpversion doesn't work | |
41 gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'` | |
42 fi | |
557 | 43 dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki |
44 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then | |
697 | 45 echo 'GCC [[34]].0.[[12]] has a bug in the optimizer, disabling "-O#"' |
7 | 46 CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-O/'` |
47 else | |
48 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then | |
49 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"' | |
50 CFLAGS="$CFLAGS -fno-strength-reduce" | |
51 fi | |
52 fi | |
53 fi | |
54 | |
1621 | 55 dnl If configure thinks we are cross compiling, there might be something |
56 dnl wrong with the CC or CFLAGS settings, give a useful warning message | |
7 | 57 if test "$cross_compiling" = yes; then |
1621 | 58 AC_MSG_RESULT([cannot compile a simple program; if not cross compiling check CC and CFLAGS]) |
7 | 59 fi |
60 | |
548 | 61 dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies. |
62 dnl But gcc 3.1 changed the meaning! See near the end. | |
7 | 63 test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) |
64 | |
65 if test -f ./toolcheck; then | |
66 AC_CHECKING(for buggy tools) | |
67 sh ./toolcheck 1>&AC_FD_MSG | |
68 fi | |
69 | |
70 OS_EXTRA_SRC=""; OS_EXTRA_OBJ="" | |
71 | |
72 dnl Check for BeOS, which needs an extra source file | |
73 AC_MSG_CHECKING(for BeOS) | |
74 case `uname` in | |
75 BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o | |
76 BEOS=yes; AC_MSG_RESULT(yes);; | |
77 *) BEOS=no; AC_MSG_RESULT(no);; | |
78 esac | |
79 | |
80 dnl If QNX is found, assume we don't want to use Xphoton | |
81 dnl unless it was specifically asked for (--with-x) | |
82 AC_MSG_CHECKING(for QNX) | |
83 case `uname` in | |
84 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o | |
85 test -z "$with_x" && with_x=no | |
86 QNX=yes; AC_MSG_RESULT(yes);; | |
87 *) QNX=no; AC_MSG_RESULT(no);; | |
88 esac | |
89 | |
90 dnl Check for Darwin and MacOS X | |
91 dnl We do a check for MacOS X in the very beginning because there | |
92 dnl are a lot of other things we need to change besides GUI stuff | |
93 AC_MSG_CHECKING([for Darwin (Mac OS X)]) | |
94 if test "`(uname) 2>/dev/null`" = Darwin; then | |
95 AC_MSG_RESULT(yes) | |
96 | |
97 AC_MSG_CHECKING(--disable-darwin argument) | |
98 AC_ARG_ENABLE(darwin, | |
99 [ --disable-darwin Disable Darwin (Mac OS X) support.], | |
100 , [enable_darwin="yes"]) | |
101 if test "$enable_darwin" = "yes"; then | |
102 AC_MSG_RESULT(no) | |
103 AC_MSG_CHECKING(if Darwin files are there) | |
104 if test -f os_macosx.c; then | |
105 AC_MSG_RESULT(yes) | |
106 else | |
107 AC_MSG_RESULT([no, Darwin support disabled]) | |
108 enable_darwin=no | |
109 fi | |
110 else | |
111 AC_MSG_RESULT([yes, Darwin support excluded]) | |
112 fi | |
113 | |
692 | 114 AC_MSG_CHECKING(--with-mac-arch argument) |
809 | 115 AC_ARG_WITH(mac-arch, [ --with-mac-arch=ARCH current, intel, ppc or both], |
692 | 116 MACARCH="$withval"; AC_MSG_RESULT($MACARCH), |
809 | 117 MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH)) |
692 | 118 |
2110
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
119 AC_MSG_CHECKING(--with-developer-dir argument) |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
120 AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools], |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
121 DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR), |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
122 DEVELOPER_DIR=""; AC_MSG_RESULT(not present)) |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
123 |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
124 if test "x$DEVELOPER_DIR" = "x"; then |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
125 AC_PATH_PROG(XCODE_SELECT, xcode-select) |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
126 if test "x$XCODE_SELECT" != "x"; then |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
127 AC_MSG_CHECKING(for developer dir using xcode-select) |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
128 DEVELOPER_DIR=`$XCODE_SELECT -print-path` |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
129 AC_MSG_RESULT([$DEVELOPER_DIR]) |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
130 else |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
131 DEVELOPER_DIR=/Developer |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
132 fi |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
133 fi |
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
134 |
692 | 135 if test "x$MACARCH" = "xboth"; then |
697 | 136 AC_MSG_CHECKING(for 10.4 universal SDK) |
137 dnl There is a terrible inconsistency (but we appear to get away with it): | |
138 dnl $CFLAGS uses the 10.4u SDK library for the headers, while $CPPFLAGS | |
139 dnl doesn't, because "gcc -E" doesn't grok it. That means the configure | |
140 dnl tests using the preprocessor are actually done with the wrong header | |
141 dnl files. $LDFLAGS is set at the end, because configure uses it together | |
142 dnl with $CFLAGS and we can only have one -sysroot argument. | |
692 | 143 save_cppflags="$CPPFLAGS" |
697 | 144 save_cflags="$CFLAGS" |
692 | 145 save_ldflags="$LDFLAGS" |
2110
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
146 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" |
692 | 147 AC_TRY_LINK([ ], [ ], |
697 | 148 AC_MSG_RESULT(found, will make universal binary), |
692 | 149 |
697 | 150 AC_MSG_RESULT(not found) |
716 | 151 CFLAGS="$save_cflags" |
697 | 152 AC_MSG_CHECKING(if Intel architecture is supported) |
153 CPPFLAGS="$CPPFLAGS -arch i386" | |
154 LDFLAGS="$save_ldflags -arch i386" | |
155 AC_TRY_LINK([ ], [ ], | |
156 AC_MSG_RESULT(yes); MACARCH="intel", | |
157 AC_MSG_RESULT(no, using PowerPC) | |
856 | 158 MACARCH="ppc" |
697 | 159 CPPFLAGS="$save_cppflags -arch ppc" |
160 LDFLAGS="$save_ldflags -arch ppc")) | |
161 elif test "x$MACARCH" = "xintel"; then | |
162 CPPFLAGS="$CPPFLAGS -arch intel" | |
163 LDFLAGS="$LDFLAGS -arch intel" | |
818 | 164 elif test "x$MACARCH" = "xppc"; then |
697 | 165 CPPFLAGS="$CPPFLAGS -arch ppc" |
166 LDFLAGS="$LDFLAGS -arch ppc" | |
692 | 167 fi |
168 | |
7 | 169 if test "$enable_darwin" = "yes"; then |
170 MACOSX=yes | |
1682 | 171 OS_EXTRA_SRC="os_macosx.c os_mac_conv.c"; |
18 | 172 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" |
685 | 173 dnl TODO: use -arch i386 on Intel machines |
697 | 174 CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" |
175 if test "x$MACARCH" = "xboth"; then | |
2110
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
176 CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon" |
697 | 177 else |
2110
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
178 CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon" |
697 | 179 fi |
7 | 180 |
181 dnl If Carbon is found, assume we don't want X11 | |
182 dnl unless it was specifically asked for (--with-x) | |
18 | 183 dnl or Motif, Athena or GTK GUI is used. |
7 | 184 AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes) |
185 if test "x$CARBON" = "xyes"; then | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
186 if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2; then |
7 | 187 with_x=no |
188 fi | |
189 fi | |
190 fi | |
692 | 191 |
798 | 192 dnl Avoid a bug with -O2 with gcc 4.0.1. Symptom: malloc() reports double |
699 | 193 dnl free. This happens in expand_filename(), because the optimizer swaps |
798 | 194 dnl two blocks of code, both using "repl", that can't be swapped. |
697 | 195 if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then |
196 CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'` | |
197 fi | |
198 | |
7 | 199 else |
200 AC_MSG_RESULT(no) | |
201 fi | |
202 | |
203 AC_SUBST(OS_EXTRA_SRC) | |
204 AC_SUBST(OS_EXTRA_OBJ) | |
205 | |
206 dnl Add /usr/local/lib to $LDFLAGS and /usr/local/include to CFLAGS. | |
207 dnl Only when the directory exists and it wasn't there yet. | |
208 dnl For gcc don't do this when it is already in the default search path. | |
1621 | 209 dnl Skip all of this when cross-compiling. |
210 if test "$cross_compiling" = no; then | |
1668 | 211 AC_MSG_CHECKING(--with-local-dir argument) |
1621 | 212 have_local_include='' |
213 have_local_lib='' | |
1668 | 214 AC_ARG_WITH([local-dir], [ --with-local-dir=PATH search PATH instead of /usr/local for local libraries. |
215 --without-local-dir do not search /usr/local for local libraries.], [ | |
216 local_dir="$withval" | |
217 case "$withval" in | |
218 */*) ;; | |
219 no) | |
220 # avoid adding local dir to LDFLAGS and CPPFLAGS | |
221 have_local_dir=yes | |
222 have_local_lib=yes | |
223 ;; | |
224 *) AC_MSG_ERROR(must pass path argument to --with-local-dir) ;; | |
225 esac | |
226 AC_MSG_RESULT($local_dir) | |
227 ], [ | |
228 local_dir=/usr/local | |
229 AC_MSG_RESULT(Defaulting to $local_dir) | |
230 ]) | |
231 if test "$GCC" = yes -a "$local_dir" != no; then | |
1621 | 232 echo 'void f(){}' > conftest.c |
233 dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler) | |
1668 | 234 have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"` |
235 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` | |
1621 | 236 rm -f conftest.c conftest.o |
7 | 237 fi |
1668 | 238 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then |
239 tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"` | |
1621 | 240 if test "$tt" = "$LDFLAGS"; then |
1668 | 241 LDFLAGS="$LDFLAGS -L${local_dir}/lib" |
1621 | 242 fi |
243 fi | |
1668 | 244 if test -z "$have_local_include" -a -d "${local_dir}/include"; then |
245 tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"` | |
1621 | 246 if test "$tt" = "$CPPFLAGS"; then |
1668 | 247 CPPFLAGS="$CPPFLAGS -I${local_dir}/include" |
1621 | 248 fi |
7 | 249 fi |
250 fi | |
251 | |
252 AC_MSG_CHECKING(--with-vim-name argument) | |
253 AC_ARG_WITH(vim-name, [ --with-vim-name=NAME what to call the Vim executable], | |
254 VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME), | |
502 | 255 VIMNAME="vim"; AC_MSG_RESULT(Defaulting to $VIMNAME)) |
7 | 256 AC_SUBST(VIMNAME) |
257 AC_MSG_CHECKING(--with-ex-name argument) | |
258 AC_ARG_WITH(ex-name, [ --with-ex-name=NAME what to call the Ex executable], | |
259 EXNAME="$withval"; AC_MSG_RESULT($EXNAME), | |
260 EXNAME="ex"; AC_MSG_RESULT(Defaulting to ex)) | |
261 AC_SUBST(EXNAME) | |
262 AC_MSG_CHECKING(--with-view-name argument) | |
263 AC_ARG_WITH(view-name, [ --with-view-name=NAME what to call the View executable], | |
264 VIEWNAME="$withval"; AC_MSG_RESULT($VIEWNAME), | |
265 VIEWNAME="view"; AC_MSG_RESULT(Defaulting to view)) | |
266 AC_SUBST(VIEWNAME) | |
267 | |
268 AC_MSG_CHECKING(--with-global-runtime argument) | |
269 AC_ARG_WITH(global-runtime, [ --with-global-runtime=DIR global runtime directory in 'runtimepath'], | |
270 AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(RUNTIME_GLOBAL, "$withval"), | |
271 AC_MSG_RESULT(no)) | |
272 | |
273 AC_MSG_CHECKING(--with-modified-by argument) | |
274 AC_ARG_WITH(modified-by, [ --with-modified-by=NAME name of who modified a release version], | |
275 AC_MSG_RESULT($withval); AC_DEFINE_UNQUOTED(MODIFIED_BY, "$withval"), | |
276 AC_MSG_RESULT(no)) | |
277 | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
278 dnl Check for EBCDIC stolen from the LYNX port to z/OS Unix |
7 | 279 AC_MSG_CHECKING(if character set is EBCDIC) |
280 AC_TRY_COMPILE([ ], | |
281 [ /* TryCompile function for CharSet. | |
282 Treat any failure as ASCII for compatibility with existing art. | |
283 Use compile-time rather than run-time tests for cross-compiler | |
284 tolerance. */ | |
285 #if '0'!=240 | |
286 make an error "Character set is not EBCDIC" | |
287 #endif ], | |
288 [ # TryCompile action if true | |
289 cf_cv_ebcdic=yes ], | |
290 [ # TryCompile action if false | |
291 cf_cv_ebcdic=no]) | |
292 # end of TryCompile ]) | |
293 # end of CacheVal CvEbcdic | |
294 AC_MSG_RESULT($cf_cv_ebcdic) | |
295 case "$cf_cv_ebcdic" in #(vi | |
296 yes) AC_DEFINE(EBCDIC) | |
297 line_break='"\\n"' | |
298 ;; | |
299 *) line_break='"\\012"';; | |
300 esac | |
301 AC_SUBST(line_break) | |
302 | |
303 if test "$cf_cv_ebcdic" = "yes"; then | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
304 dnl If we have EBCDIC we most likley have z/OS Unix, let's test it! |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
305 AC_MSG_CHECKING(for z/OS Unix) |
7 | 306 case `uname` in |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
307 OS/390) zOSUnix="yes"; |
7 | 308 dnl If using cc the environment variable _CC_CCMODE must be |
309 dnl set to "1", so that some compiler extensions are enabled. | |
310 dnl If using c89 the environment variable is named _CC_C89MODE. | |
311 dnl Note: compile with c89 never tested. | |
312 if test "$CC" = "cc"; then | |
313 ccm="$_CC_CCMODE" | |
314 ccn="CC" | |
315 else | |
316 if test "$CC" = "c89"; then | |
317 ccm="$_CC_C89MODE" | |
318 ccn="C89" | |
319 else | |
320 ccm=1 | |
321 fi | |
322 fi | |
323 if test "$ccm" != "1"; then | |
324 echo "" | |
325 echo "------------------------------------------" | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
326 echo " On z/OS Unix, the environment variable" |
7 | 327 echo " __CC_${ccn}MODE must be set to \"1\"!" |
328 echo " Do:" | |
329 echo " export _CC_${ccn}MODE=1" | |
330 echo " and then call configure again." | |
331 echo "------------------------------------------" | |
332 exit 1 | |
333 fi | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
334 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float\\(IEEE\\)"; |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
335 LDFLAGS="$LDFLAGS -Wl,EDIT=NO" |
7 | 336 AC_MSG_RESULT(yes) |
337 ;; | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
338 *) zOSUnix="no"; |
7 | 339 AC_MSG_RESULT(no) |
340 ;; | |
341 esac | |
342 fi | |
343 | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
344 dnl Set QUOTESED. Needs additional backslashes on zOS |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
345 if test "$zOSUnix" = "yes"; then |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
346 QUOTESED="sed -e 's/[[\\\\\"]]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/'" |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
347 else |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
348 QUOTESED="sed -e 's/[[\\\\\"]]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/'" |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
349 fi |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
350 AC_SUBST(QUOTESED) |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
351 |
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
352 |
1583 | 353 dnl Link with -lselinux for SELinux stuff; if not found |
354 AC_MSG_CHECKING(--disable-selinux argument) | |
355 AC_ARG_ENABLE(selinux, | |
356 [ --disable-selinux Don't check for SELinux support.], | |
357 , enable_selinux="yes") | |
358 if test "$enable_selinux" = "yes"; then | |
359 AC_MSG_RESULT(no) | |
360 AC_CHECK_LIB(selinux, is_selinux_enabled, | |
361 [LIBS="$LIBS -lselinux" | |
362 AC_DEFINE(HAVE_SELINUX)]) | |
363 else | |
364 AC_MSG_RESULT(yes) | |
365 fi | |
7 | 366 |
367 dnl Check user requested features. | |
368 | |
369 AC_MSG_CHECKING(--with-features argument) | |
370 AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: normal)], | |
371 features="$withval"; AC_MSG_RESULT($features), | |
372 features="normal"; AC_MSG_RESULT(Defaulting to normal)) | |
373 | |
374 dovimdiff="" | |
375 dogvimdiff="" | |
376 case "$features" in | |
377 tiny) AC_DEFINE(FEAT_TINY) ;; | |
378 small) AC_DEFINE(FEAT_SMALL) ;; | |
379 normal) AC_DEFINE(FEAT_NORMAL) dovimdiff="installvimdiff"; | |
380 dogvimdiff="installgvimdiff" ;; | |
381 big) AC_DEFINE(FEAT_BIG) dovimdiff="installvimdiff"; | |
382 dogvimdiff="installgvimdiff" ;; | |
383 huge) AC_DEFINE(FEAT_HUGE) dovimdiff="installvimdiff"; | |
384 dogvimdiff="installgvimdiff" ;; | |
385 *) AC_MSG_RESULT([Sorry, $features is not supported]) ;; | |
386 esac | |
387 | |
388 AC_SUBST(dovimdiff) | |
389 AC_SUBST(dogvimdiff) | |
390 | |
391 AC_MSG_CHECKING(--with-compiledby argument) | |
392 AC_ARG_WITH(compiledby, [ --with-compiledby=NAME name to show in :version message], | |
393 compiledby="$withval"; AC_MSG_RESULT($withval), | |
394 compiledby=""; AC_MSG_RESULT(no)) | |
395 AC_SUBST(compiledby) | |
396 | |
397 AC_MSG_CHECKING(--disable-xsmp argument) | |
398 AC_ARG_ENABLE(xsmp, | |
399 [ --disable-xsmp Disable XSMP session management], | |
400 , enable_xsmp="yes") | |
401 | |
402 if test "$enable_xsmp" = "yes"; then | |
403 AC_MSG_RESULT(no) | |
404 AC_MSG_CHECKING(--disable-xsmp-interact argument) | |
405 AC_ARG_ENABLE(xsmp-interact, | |
406 [ --disable-xsmp-interact Disable XSMP interaction], | |
407 , enable_xsmp_interact="yes") | |
408 if test "$enable_xsmp_interact" = "yes"; then | |
409 AC_MSG_RESULT(no) | |
410 AC_DEFINE(USE_XSMP_INTERACT) | |
411 else | |
412 AC_MSG_RESULT(yes) | |
413 fi | |
414 else | |
415 AC_MSG_RESULT(yes) | |
416 fi | |
417 | |
14 | 418 dnl Check for MzScheme feature. |
419 AC_MSG_CHECKING(--enable-mzschemeinterp argument) | |
420 AC_ARG_ENABLE(mzschemeinterp, | |
421 [ --enable-mzschemeinterp Include MzScheme interpreter.], , | |
422 [enable_mzschemeinterp="no"]) | |
423 AC_MSG_RESULT($enable_mzschemeinterp) | |
424 | |
425 if test "$enable_mzschemeinterp" = "yes"; then | |
426 dnl -- find the mzscheme executable | |
427 AC_SUBST(vi_cv_path_mzscheme) | |
428 | |
429 AC_MSG_CHECKING(--with-plthome argument) | |
430 AC_ARG_WITH(plthome, | |
856 | 431 [ --with-plthome=PLTHOME Use PLTHOME.], |
432 with_plthome="$withval"; AC_MSG_RESULT($with_plthome), | |
14 | 433 with_plthome="";AC_MSG_RESULT("no")) |
434 | |
435 if test "X$with_plthome" != "X"; then | |
436 vi_cv_path_mzscheme_pfx="$with_plthome" | |
437 else | |
438 AC_MSG_CHECKING(PLTHOME environment var) | |
439 if test "X$PLTHOME" != "X"; then | |
440 AC_MSG_RESULT("$PLTHOME") | |
856 | 441 vi_cv_path_mzscheme_pfx="$PLTHOME" |
14 | 442 else |
1894 | 443 AC_MSG_RESULT(not set) |
14 | 444 dnl -- try to find MzScheme executable |
856 | 445 AC_PATH_PROG(vi_cv_path_mzscheme, mzscheme) |
14 | 446 |
447 dnl resolve symbolic link, the executable is often elsewhere and there | |
448 dnl are no links for the include files. | |
856 | 449 if test "X$vi_cv_path_mzscheme" != "X"; then |
14 | 450 lsout=`ls -l $vi_cv_path_mzscheme` |
451 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then | |
452 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'` | |
453 fi | |
454 fi | |
455 | |
856 | 456 if test "X$vi_cv_path_mzscheme" != "X"; then |
457 dnl -- find where MzScheme thinks it was installed | |
458 AC_CACHE_CHECK(MzScheme install prefix,vi_cv_path_mzscheme_pfx, | |
1894 | 459 dnl different versions of MzScheme differ in command line processing |
460 dnl use universal approach | |
461 echo "(display (simplify-path \ | |
856 | 462 (build-path (call-with-values \ |
463 (lambda () (split-path (find-system-path (quote exec-file)))) \ | |
1894 | 464 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm |
465 dnl Remove a trailing slash | |
466 [ vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \ | |
467 sed -e 's+/$++'` ]) | |
468 rm -f mzdirs.scm | |
856 | 469 fi |
14 | 470 fi |
471 fi | |
472 | |
1154 | 473 SCHEME_INC= |
14 | 474 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then |
475 AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include) | |
476 if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then | |
1894 | 477 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include |
478 AC_MSG_RESULT(yes) | |
14 | 479 else |
1894 | 480 AC_MSG_RESULT(no) |
481 AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt) | |
1154 | 482 if test -f $vi_cv_path_mzscheme_pfx/include/plt/scheme.h; then |
1894 | 483 AC_MSG_RESULT(yes) |
484 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt | |
1154 | 485 else |
1894 | 486 AC_MSG_RESULT(no) |
487 AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/) | |
488 if test -f /usr/include/plt/scheme.h; then | |
489 AC_MSG_RESULT(yes) | |
490 SCHEME_INC=/usr/include/plt | |
491 else | |
492 AC_MSG_RESULT(no) | |
493 vi_cv_path_mzscheme_pfx= | |
494 fi | |
1154 | 495 fi |
14 | 496 fi |
497 fi | |
498 | |
499 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then | |
1301 | 500 if test "x$MACOSX" = "xyes"; then |
501 MZSCHEME_LIBS="-framework PLT_MzScheme" | |
1894 | 502 elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then |
503 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a" | |
504 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC" | |
1301 | 505 elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then |
1264 | 506 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a" |
14 | 507 else |
1894 | 508 dnl Using shared objects |
509 if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then | |
510 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m" | |
511 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC" | |
512 else | |
513 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc" | |
514 fi | |
16 | 515 if test "$GCC" = yes; then |
516 dnl Make Vim remember the path to the library. For when it's not in | |
517 dnl $LD_LIBRARY_PATH. | |
1894 | 518 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib" |
17 | 519 elif test "`(uname) 2>/dev/null`" = SunOS && |
520 uname -r | grep '^5' >/dev/null; then | |
1894 | 521 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${vi_cv_path_mzscheme_pfx}/lib" |
16 | 522 fi |
14 | 523 fi |
1154 | 524 if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then |
525 SCHEME_COLLECTS=lib/plt/ | |
526 fi | |
1894 | 527 if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then |
528 dnl need to generate bytecode for MzScheme base | |
529 MZSCHEME_EXTRA="mzscheme_base.c" | |
530 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE" | |
531 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc" | |
532 fi | |
533 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \ | |
1154 | 534 -DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects\"'" |
14 | 535 MZSCHEME_SRC="if_mzsch.c" |
536 MZSCHEME_OBJ="objects/if_mzsch.o" | |
537 MZSCHEME_PRO="if_mzsch.pro" | |
538 AC_DEFINE(FEAT_MZSCHEME) | |
539 fi | |
540 AC_SUBST(MZSCHEME_SRC) | |
541 AC_SUBST(MZSCHEME_OBJ) | |
542 AC_SUBST(MZSCHEME_PRO) | |
543 AC_SUBST(MZSCHEME_LIBS) | |
544 AC_SUBST(MZSCHEME_CFLAGS) | |
1894 | 545 AC_SUBST(MZSCHEME_EXTRA) |
546 AC_SUBST(MZSCHEME_MZC) | |
14 | 547 fi |
548 | |
549 | |
7 | 550 AC_MSG_CHECKING(--enable-perlinterp argument) |
551 AC_ARG_ENABLE(perlinterp, | |
552 [ --enable-perlinterp Include Perl interpreter.], , | |
553 [enable_perlinterp="no"]) | |
554 AC_MSG_RESULT($enable_perlinterp) | |
555 if test "$enable_perlinterp" = "yes"; then | |
556 AC_SUBST(vi_cv_path_perl) | |
557 AC_PATH_PROG(vi_cv_path_perl, perl) | |
558 if test "X$vi_cv_path_perl" != "X"; then | |
559 AC_MSG_CHECKING(Perl version) | |
560 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then | |
561 eval `$vi_cv_path_perl -V:usethreads` | |
562 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then | |
563 badthreads=no | |
564 else | |
565 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then | |
566 eval `$vi_cv_path_perl -V:use5005threads` | |
567 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then | |
568 badthreads=no | |
569 else | |
570 badthreads=yes | |
571 AC_MSG_RESULT(>>> Perl > 5.6 with 5.5 threads cannot be used <<<) | |
572 fi | |
573 else | |
574 badthreads=yes | |
575 AC_MSG_RESULT(>>> Perl 5.5 with threads cannot be used <<<) | |
576 fi | |
577 fi | |
578 if test $badthreads = no; then | |
579 AC_MSG_RESULT(OK) | |
580 eval `$vi_cv_path_perl -V:shrpenv` | |
581 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04 | |
582 shrpenv="" | |
583 fi | |
584 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'` | |
585 AC_SUBST(vi_cv_perllib) | |
586 dnl Remove "-fno-something", it breaks using cproto. | |
587 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ | |
588 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//'` | |
589 dnl Remove "-lc", it breaks on FreeBSD when using "-pthread". | |
590 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \ | |
591 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \ | |
592 -e 's/-bE:perl.exp//' -e 's/-lc //'` | |
593 dnl Don't add perl lib to $LIBS: if it's not in LD_LIBRARY_PATH | |
594 dnl a test in configure may fail because of that. | |
595 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \ | |
596 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'` | |
597 | |
598 dnl check that compiling a simple program still works with the flags | |
599 dnl added for Perl. | |
600 AC_MSG_CHECKING([if compile and link flags for Perl are sane]) | |
601 cflags_save=$CFLAGS | |
602 libs_save=$LIBS | |
603 ldflags_save=$LDFLAGS | |
604 CFLAGS="$CFLAGS $perlcppflags" | |
605 LIBS="$LIBS $perllibs" | |
606 LDFLAGS="$perlldflags $LDFLAGS" | |
607 AC_TRY_LINK(,[ ], | |
608 AC_MSG_RESULT(yes); perl_ok=yes, | |
609 AC_MSG_RESULT(no: PERL DISABLED); perl_ok=no) | |
610 CFLAGS=$cflags_save | |
611 LIBS=$libs_save | |
612 LDFLAGS=$ldflags_save | |
613 if test $perl_ok = yes; then | |
614 if test "X$perlcppflags" != "X"; then | |
1154 | 615 dnl remove -pipe and -Wxxx, it confuses cproto |
616 PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[[^ ]]*//'` | |
7 | 617 fi |
618 if test "X$perlldflags" != "X"; then | |
619 LDFLAGS="$perlldflags $LDFLAGS" | |
620 fi | |
621 PERL_LIBS=$perllibs | |
622 PERL_SRC="auto/if_perl.c if_perlsfio.c" | |
623 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o" | |
624 PERL_PRO="if_perl.pro if_perlsfio.pro" | |
625 AC_DEFINE(FEAT_PERL) | |
626 fi | |
627 fi | |
628 else | |
629 AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<) | |
630 fi | |
631 fi | |
632 | |
633 if test "x$MACOSX" = "xyes"; then | |
574 | 634 dnl Mac OS X 10.2 or later |
7 | 635 dir=/System/Library/Perl |
636 darwindir=$dir/darwin | |
637 if test -d $darwindir; then | |
638 PERL=/usr/bin/perl | |
639 else | |
640 dnl Mac OS X 10.3 | |
641 dir=/System/Library/Perl/5.8.1 | |
642 darwindir=$dir/darwin-thread-multi-2level | |
643 if test -d $darwindir; then | |
644 PERL=/usr/bin/perl | |
645 fi | |
646 fi | |
647 if test -n "$PERL"; then | |
648 PERL_DIR="$dir" | |
649 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE" | |
650 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a" | |
651 PERL_LIBS="-L$darwindir/CORE -lperl" | |
652 fi | |
653 fi | |
654 fi | |
655 AC_SUBST(shrpenv) | |
656 AC_SUBST(PERL_SRC) | |
657 AC_SUBST(PERL_OBJ) | |
658 AC_SUBST(PERL_PRO) | |
659 AC_SUBST(PERL_CFLAGS) | |
660 AC_SUBST(PERL_LIBS) | |
661 | |
662 AC_MSG_CHECKING(--enable-pythoninterp argument) | |
663 AC_ARG_ENABLE(pythoninterp, | |
664 [ --enable-pythoninterp Include Python interpreter.], , | |
665 [enable_pythoninterp="no"]) | |
666 AC_MSG_RESULT($enable_pythoninterp) | |
667 if test "$enable_pythoninterp" = "yes"; then | |
668 dnl -- find the python executable | |
669 AC_PATH_PROG(vi_cv_path_python, python) | |
670 if test "X$vi_cv_path_python" != "X"; then | |
671 | |
672 dnl -- get its version number | |
673 AC_CACHE_CHECK(Python version,vi_cv_var_python_version, | |
674 [[vi_cv_var_python_version=` | |
675 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'` | |
676 ]]) | |
677 | |
678 dnl -- it must be at least version 1.4 | |
679 AC_MSG_CHECKING(Python is 1.4 or better) | |
680 if ${vi_cv_path_python} -c \ | |
681 "import sys; sys.exit(${vi_cv_var_python_version} < 1.4)" | |
682 then | |
683 AC_MSG_RESULT(yep) | |
684 | |
685 dnl -- find where python thinks it was installed | |
686 AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python_pfx, | |
687 [ vi_cv_path_python_pfx=` | |
688 ${vi_cv_path_python} -c \ | |
689 "import sys; print sys.prefix"` ]) | |
690 | |
691 dnl -- and where it thinks it runs | |
692 AC_CACHE_CHECK(Python's execution prefix,vi_cv_path_python_epfx, | |
693 [ vi_cv_path_python_epfx=` | |
694 ${vi_cv_path_python} -c \ | |
695 "import sys; print sys.exec_prefix"` ]) | |
696 | |
697 dnl -- python's internal library path | |
698 | |
699 AC_CACHE_VAL(vi_cv_path_pythonpath, | |
700 [ vi_cv_path_pythonpath=` | |
701 unset PYTHONPATH; | |
702 ${vi_cv_path_python} -c \ | |
703 "import sys, string; print string.join(sys.path,':')"` ]) | |
704 | |
705 dnl -- where the Python implementation library archives are | |
706 | |
707 AC_ARG_WITH(python-config-dir, | |
708 [ --with-python-config-dir=PATH Python's config directory], | |
709 [ vi_cv_path_python_conf="${withval}" ] ) | |
710 | |
711 AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python_conf, | |
712 [ | |
713 vi_cv_path_python_conf= | |
714 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do | |
2018 | 715 for subdir in lib64 lib share; do |
7 | 716 d="${path}/${subdir}/python${vi_cv_var_python_version}/config" |
717 if test -d "$d" && test -f "$d/config.c"; then | |
718 vi_cv_path_python_conf="$d" | |
719 fi | |
720 done | |
721 done | |
722 ]) | |
723 | |
724 PYTHON_CONFDIR="${vi_cv_path_python_conf}" | |
725 | |
726 if test "X$PYTHON_CONFDIR" = "X"; then | |
727 AC_MSG_RESULT([can't find it!]) | |
728 else | |
729 | |
730 dnl -- we need to examine Python's config/Makefile too | |
731 dnl see what the interpreter is built from | |
732 AC_CACHE_VAL(vi_cv_path_python_plibs, | |
733 [ | |
1681 | 734 pwd=`pwd` |
735 tmp_mkf="$pwd/config-PyMake$$" | |
736 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}" | |
7 | 737 __: |
2200
99ba9a30755a
Various smaller changes. Updated proto files. Updated dependencies.
Bram Moolenaar <bram@vim.org>
parents:
2199
diff
changeset
|
738 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'" |
7 | 739 @echo "python_LIBS='$(LIBS)'" |
740 @echo "python_SYSLIBS='$(SYSLIBS)'" | |
741 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'" | |
742 eof | |
743 dnl -- delete the lines from make about Entering/Leaving directory | |
1681 | 744 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" |
745 rm -f -- "${tmp_mkf}" | |
7 | 746 if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \ |
747 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then | |
748 vi_cv_path_python_plibs="-framework Python" | |
749 else | |
750 if test "${vi_cv_var_python_version}" = "1.4"; then | |
751 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" | |
752 else | |
753 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" | |
754 fi | |
2200
99ba9a30755a
Various smaller changes. Updated proto files. Updated dependencies.
Bram Moolenaar <bram@vim.org>
parents:
2199
diff
changeset
|
755 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" |
7 | 756 dnl remove -ltermcap, it can conflict with an earlier -lncurses |
757 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` | |
758 fi | |
759 ]) | |
760 | |
761 PYTHON_LIBS="${vi_cv_path_python_plibs}" | |
762 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then | |
763 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}" | |
764 else | |
765 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}" | |
766 fi | |
767 PYTHON_SRC="if_python.c" | |
768 dnl For Mac OSX 10.2 config.o is included in the Python library. | |
769 if test "x$MACOSX" = "xyes"; then | |
770 PYTHON_OBJ="objects/if_python.o" | |
771 else | |
772 PYTHON_OBJ="objects/if_python.o objects/py_config.o" | |
773 fi | |
774 if test "${vi_cv_var_python_version}" = "1.4"; then | |
775 PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" | |
776 fi | |
777 PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" | |
778 | |
779 dnl On FreeBSD linking with "-pthread" is required to use threads. | |
780 dnl _THREAD_SAFE must be used for compiling then. | |
781 dnl The "-pthread" is added to $LIBS, so that the following check for | |
782 dnl sigaltstack() will look in libc_r (it's there in libc!). | |
783 dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC | |
784 dnl will then define target-specific defines, e.g., -D_REENTRANT. | |
785 dnl Don't do this for Mac OSX, -pthread will generate a warning. | |
786 AC_MSG_CHECKING([if -pthread should be used]) | |
787 threadsafe_flag= | |
788 thread_lib= | |
997 | 789 dnl if test "x$MACOSX" != "xyes"; then |
790 if test "`(uname) 2>/dev/null`" != Darwin; then | |
7 | 791 test "$GCC" = yes && threadsafe_flag="-pthread" |
792 if test "`(uname) 2>/dev/null`" = FreeBSD; then | |
793 threadsafe_flag="-D_THREAD_SAFE" | |
794 thread_lib="-pthread" | |
795 fi | |
796 fi | |
797 libs_save_old=$LIBS | |
798 if test -n "$threadsafe_flag"; then | |
799 cflags_save=$CFLAGS | |
800 CFLAGS="$CFLAGS $threadsafe_flag" | |
801 LIBS="$LIBS $thread_lib" | |
802 AC_TRY_LINK(,[ ], | |
2303
6ebb886efe3c
Filter out -pthread for cproto.
Bram Moolenaar <bram@vim.org>
parents:
2285
diff
changeset
|
803 AC_MSG_RESULT(yes); PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag", |
7 | 804 AC_MSG_RESULT(no); LIBS=$libs_save_old |
805 ) | |
806 CFLAGS=$cflags_save | |
807 else | |
808 AC_MSG_RESULT(no) | |
809 fi | |
810 | |
811 dnl check that compiling a simple program still works with the flags | |
812 dnl added for Python. | |
813 AC_MSG_CHECKING([if compile and link flags for Python are sane]) | |
814 cflags_save=$CFLAGS | |
815 libs_save=$LIBS | |
2303
6ebb886efe3c
Filter out -pthread for cproto.
Bram Moolenaar <bram@vim.org>
parents:
2285
diff
changeset
|
816 CFLAGS="$CFLAGS $PYTHON_CFLAGS" |
7 | 817 LIBS="$LIBS $PYTHON_LIBS" |
818 AC_TRY_LINK(,[ ], | |
819 AC_MSG_RESULT(yes); python_ok=yes, | |
820 AC_MSG_RESULT(no: PYTHON DISABLED); python_ok=no) | |
821 CFLAGS=$cflags_save | |
822 LIBS=$libs_save | |
823 if test $python_ok = yes; then | |
824 AC_DEFINE(FEAT_PYTHON) | |
825 else | |
826 LIBS=$libs_save_old | |
827 PYTHON_SRC= | |
828 PYTHON_OBJ= | |
829 PYTHON_LIBS= | |
830 PYTHON_CFLAGS= | |
831 fi | |
832 | |
833 fi | |
834 else | |
835 AC_MSG_RESULT(too old) | |
836 fi | |
837 fi | |
838 fi | |
839 AC_SUBST(PYTHON_CONFDIR) | |
840 AC_SUBST(PYTHON_LIBS) | |
841 AC_SUBST(PYTHON_GETPATH_CFLAGS) | |
842 AC_SUBST(PYTHON_CFLAGS) | |
843 AC_SUBST(PYTHON_SRC) | |
844 AC_SUBST(PYTHON_OBJ) | |
845 | |
846 AC_MSG_CHECKING(--enable-tclinterp argument) | |
847 AC_ARG_ENABLE(tclinterp, | |
848 [ --enable-tclinterp Include Tcl interpreter.], , | |
849 [enable_tclinterp="no"]) | |
850 AC_MSG_RESULT($enable_tclinterp) | |
851 | |
852 if test "$enable_tclinterp" = "yes"; then | |
853 | |
1464 | 854 dnl on FreeBSD tclsh is a silly script, look for tclsh8.[5420] |
7 | 855 AC_MSG_CHECKING(--with-tclsh argument) |
856 AC_ARG_WITH(tclsh, [ --with-tclsh=PATH which tclsh to use (default: tclsh8.0)], | |
857 tclsh_name="$withval"; AC_MSG_RESULT($tclsh_name), | |
1464 | 858 tclsh_name="tclsh8.5"; AC_MSG_RESULT(no)) |
7 | 859 AC_PATH_PROG(vi_cv_path_tcl, $tclsh_name) |
860 AC_SUBST(vi_cv_path_tcl) | |
861 | |
1464 | 862 dnl when no specific version specified, also try 8.4, 8.2 and 8.0 |
863 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then | |
864 tclsh_name="tclsh8.4" | |
865 AC_PATH_PROG(vi_cv_path_tcl, $tclsh_name) | |
866 fi | |
132 | 867 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then |
7 | 868 tclsh_name="tclsh8.2" |
869 AC_PATH_PROG(vi_cv_path_tcl, $tclsh_name) | |
870 fi | |
132 | 871 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then |
872 tclsh_name="tclsh8.0" | |
873 AC_PATH_PROG(vi_cv_path_tcl, $tclsh_name) | |
874 fi | |
7 | 875 dnl still didn't find it, try without version number |
876 if test "X$vi_cv_path_tcl" = "X"; then | |
877 tclsh_name="tclsh" | |
878 AC_PATH_PROG(vi_cv_path_tcl, $tclsh_name) | |
879 fi | |
880 if test "X$vi_cv_path_tcl" != "X"; then | |
881 AC_MSG_CHECKING(Tcl version) | |
882 if echo 'exit [[expr [info tclversion] < 8.0]]' | $vi_cv_path_tcl - ; then | |
883 tclver=`echo 'puts [[info tclversion]]' | $vi_cv_path_tcl -` | |
884 AC_MSG_RESULT($tclver - OK); | |
885 tclloc=`echo 'set l [[info library]];set i [[string last lib $l]];incr i -2;puts [[string range $l 0 $i]]' | $vi_cv_path_tcl -` | |
886 | |
887 AC_MSG_CHECKING(for location of Tcl include) | |
888 if test "x$MACOSX" != "xyes"; then | |
1542 | 889 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver" |
7 | 890 else |
891 dnl For Mac OS X 10.3, use the OS-provided framework location | |
892 tclinc="/System/Library/Frameworks/Tcl.framework/Headers" | |
893 fi | |
1542 | 894 TCL_INC= |
7 | 895 for try in $tclinc; do |
896 if test -f "$try/tcl.h"; then | |
897 AC_MSG_RESULT($try/tcl.h) | |
898 TCL_INC=$try | |
899 break | |
900 fi | |
901 done | |
902 if test -z "$TCL_INC"; then | |
903 AC_MSG_RESULT(<not found>) | |
904 SKIP_TCL=YES | |
905 fi | |
906 if test -z "$SKIP_TCL"; then | |
907 AC_MSG_CHECKING(for location of tclConfig.sh script) | |
908 if test "x$MACOSX" != "xyes"; then | |
909 tclcnf=`echo $tclinc | sed s/include/lib/g` | |
1464 | 910 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`" |
7 | 911 else |
912 dnl For Mac OS X 10.3, use the OS-provided framework location | |
913 tclcnf="/System/Library/Frameworks/Tcl.framework" | |
914 fi | |
915 for try in $tclcnf; do | |
916 if test -f $try/tclConfig.sh; then | |
917 AC_MSG_RESULT($try/tclConfig.sh) | |
918 . $try/tclConfig.sh | |
919 dnl use eval, because tcl 8.2 includes ${TCL_DBGX} | |
920 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"` | |
921 dnl Use $TCL_DEFS for -D_THREAD_SAFE et al. But only use the | |
132 | 922 dnl "-D_ABC" items. Watch out for -DFOO=long\ long. |
1679 | 923 TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[[^-]]/d' -e '/^-[[^D]]/d' -e '/-D[[^_]]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'` |
7 | 924 break |
925 fi | |
926 done | |
927 if test -z "$TCL_LIBS"; then | |
928 AC_MSG_RESULT(<not found>) | |
929 AC_MSG_CHECKING(for Tcl library by myself) | |
930 tcllib=`echo $tclinc | sed s/include/lib/g` | |
1464 | 931 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`" |
7 | 932 for ext in .so .a ; do |
933 for ver in "" $tclver ; do | |
934 for try in $tcllib ; do | |
935 trylib=tcl$ver$ext | |
936 if test -f $try/lib$trylib ; then | |
937 AC_MSG_RESULT($try/lib$trylib) | |
938 TCL_LIBS="-L$try -ltcl$ver -ldl -lm" | |
939 if test "`(uname) 2>/dev/null`" = SunOS && | |
940 uname -r | grep '^5' >/dev/null; then | |
941 TCL_LIBS="$TCL_LIBS -R $try" | |
942 fi | |
943 break 3 | |
944 fi | |
945 done | |
946 done | |
947 done | |
948 if test -z "$TCL_LIBS"; then | |
949 AC_MSG_RESULT(<not found>) | |
950 SKIP_TCL=YES | |
951 fi | |
952 fi | |
953 if test -z "$SKIP_TCL"; then | |
954 AC_DEFINE(FEAT_TCL) | |
955 TCL_SRC=if_tcl.c | |
956 TCL_OBJ=objects/if_tcl.o | |
957 TCL_PRO=if_tcl.pro | |
958 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS" | |
959 fi | |
960 fi | |
961 else | |
962 AC_MSG_RESULT(too old; need Tcl version 8.0 or later) | |
963 fi | |
964 fi | |
965 fi | |
966 AC_SUBST(TCL_SRC) | |
967 AC_SUBST(TCL_OBJ) | |
968 AC_SUBST(TCL_PRO) | |
969 AC_SUBST(TCL_CFLAGS) | |
970 AC_SUBST(TCL_LIBS) | |
971 | |
972 AC_MSG_CHECKING(--enable-rubyinterp argument) | |
973 AC_ARG_ENABLE(rubyinterp, | |
974 [ --enable-rubyinterp Include Ruby interpreter.], , | |
975 [enable_rubyinterp="no"]) | |
976 AC_MSG_RESULT($enable_rubyinterp) | |
977 if test "$enable_rubyinterp" = "yes"; then | |
2077
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
978 AC_MSG_CHECKING(--with-ruby-command argument) |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
979 AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
980 RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
981 RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) |
7 | 982 AC_SUBST(vi_cv_path_ruby) |
2077
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
983 AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) |
7 | 984 if test "X$vi_cv_path_ruby" != "X"; then |
985 AC_MSG_CHECKING(Ruby version) | |
189 | 986 if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then |
7 | 987 AC_MSG_RESULT(OK) |
988 AC_MSG_CHECKING(Ruby header files) | |
2077
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
989 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` |
7 | 990 if test "X$rubyhdrdir" != "X"; then |
991 AC_MSG_RESULT($rubyhdrdir) | |
992 RUBY_CFLAGS="-I$rubyhdrdir" | |
2077
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
993 rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'` |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
994 if test -d "$rubyhdrdir/$rubyarch"; then |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
995 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
996 fi |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
997 rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'` |
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
998 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" |
7 | 999 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` |
1000 if test "X$rubylibs" != "X"; then | |
1001 RUBY_LIBS="$rubylibs" | |
1002 fi | |
1003 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` | |
1004 if test -f "$rubyhdrdir/$librubyarg"; then | |
1005 librubyarg="$rubyhdrdir/$librubyarg" | |
1006 else | |
1007 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` | |
1008 if test -f "$rubylibdir/$librubyarg"; then | |
1009 librubyarg="$rubylibdir/$librubyarg" | |
1010 elif test "$librubyarg" = "libruby.a"; then | |
1011 dnl required on Mac OS 10.3 where libruby.a doesn't exist | |
1012 librubyarg="-lruby" | |
1013 else | |
1014 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` | |
1015 fi | |
1016 fi | |
1017 | |
1018 if test "X$librubyarg" != "X"; then | |
1019 RUBY_LIBS="$librubyarg $RUBY_LIBS" | |
1020 fi | |
1021 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` | |
1022 if test "X$rubyldflags" != "X"; then | |
1939 | 1023 dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should only |
1024 dnl be included if requested by passing --with-mac-arch to | |
1025 dnl configure, so strip these flags first (if present) | |
1026 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//'` | |
1027 if test "X$rubyldflags" != "X"; then | |
1028 LDFLAGS="$rubyldflags $LDFLAGS" | |
1029 fi | |
7 | 1030 fi |
1031 RUBY_SRC="if_ruby.c" | |
1032 RUBY_OBJ="objects/if_ruby.o" | |
1033 RUBY_PRO="if_ruby.pro" | |
1034 AC_DEFINE(FEAT_RUBY) | |
1035 else | |
2077
d8983769c9dd
updated for version 7.2.361
Bram Moolenaar <bram@zimbu.org>
parents:
2019
diff
changeset
|
1036 AC_MSG_RESULT(not found; disabling Ruby) |
7 | 1037 fi |
1038 else | |
1039 AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) | |
1040 fi | |
1041 fi | |
1042 fi | |
1043 AC_SUBST(RUBY_SRC) | |
1044 AC_SUBST(RUBY_OBJ) | |
1045 AC_SUBST(RUBY_PRO) | |
1046 AC_SUBST(RUBY_CFLAGS) | |
1047 AC_SUBST(RUBY_LIBS) | |
1048 | |
1049 AC_MSG_CHECKING(--enable-cscope argument) | |
1050 AC_ARG_ENABLE(cscope, | |
1051 [ --enable-cscope Include cscope interface.], , | |
1052 [enable_cscope="no"]) | |
1053 AC_MSG_RESULT($enable_cscope) | |
1054 if test "$enable_cscope" = "yes"; then | |
1055 AC_DEFINE(FEAT_CSCOPE) | |
1056 fi | |
1057 | |
1058 AC_MSG_CHECKING(--enable-workshop argument) | |
1059 AC_ARG_ENABLE(workshop, | |
1060 [ --enable-workshop Include Sun Visual Workshop support.], , | |
1061 [enable_workshop="no"]) | |
1062 AC_MSG_RESULT($enable_workshop) | |
1063 if test "$enable_workshop" = "yes"; then | |
1064 AC_DEFINE(FEAT_SUN_WORKSHOP) | |
1065 WORKSHOP_SRC="workshop.c integration.c" | |
1066 AC_SUBST(WORKSHOP_SRC) | |
1067 WORKSHOP_OBJ="objects/workshop.o objects/integration.o" | |
1068 AC_SUBST(WORKSHOP_OBJ) | |
1069 if test "${enable_gui-xxx}" = xxx; then | |
1070 enable_gui=motif | |
1071 fi | |
1072 fi | |
1073 | |
1074 AC_MSG_CHECKING(--disable-netbeans argument) | |
1075 AC_ARG_ENABLE(netbeans, | |
1076 [ --disable-netbeans Disable NetBeans integration support.], | |
1077 , [enable_netbeans="yes"]) | |
1078 if test "$enable_netbeans" = "yes"; then | |
1079 AC_MSG_RESULT(no) | |
1080 dnl On Solaris we need the socket and nsl library. | |
1081 AC_CHECK_LIB(socket, socket) | |
1082 AC_CHECK_LIB(nsl, gethostbyname) | |
1083 AC_MSG_CHECKING(whether compiling netbeans integration is possible) | |
1084 AC_TRY_LINK([ | |
1085 #include <stdio.h> | |
1086 #include <stdlib.h> | |
1087 #include <stdarg.h> | |
1088 #include <fcntl.h> | |
1089 #include <netdb.h> | |
1090 #include <netinet/in.h> | |
1091 #include <errno.h> | |
1092 #include <sys/types.h> | |
1093 #include <sys/socket.h> | |
1094 /* Check bitfields */ | |
1095 struct nbbuf { | |
1096 unsigned int initDone:1; | |
1097 ushort signmaplen; | |
1098 }; | |
1099 ], [ | |
1100 /* Check creating a socket. */ | |
1101 struct sockaddr_in server; | |
1102 (void)socket(AF_INET, SOCK_STREAM, 0); | |
1103 (void)htons(100); | |
1104 (void)gethostbyname("microsoft.com"); | |
1105 if (errno == ECONNREFUSED) | |
1106 (void)connect(1, (struct sockaddr *)&server, sizeof(server)); | |
1107 ], | |
1108 AC_MSG_RESULT(yes), | |
1109 AC_MSG_RESULT(no); enable_netbeans="no") | |
1110 else | |
1111 AC_MSG_RESULT(yes) | |
1112 fi | |
1113 if test "$enable_netbeans" = "yes"; then | |
1114 AC_DEFINE(FEAT_NETBEANS_INTG) | |
1115 NETBEANS_SRC="netbeans.c" | |
1116 AC_SUBST(NETBEANS_SRC) | |
1117 NETBEANS_OBJ="objects/netbeans.o" | |
1118 AC_SUBST(NETBEANS_OBJ) | |
1119 fi | |
1120 | |
1121 AC_MSG_CHECKING(--enable-sniff argument) | |
1122 AC_ARG_ENABLE(sniff, | |
1123 [ --enable-sniff Include Sniff interface.], , | |
1124 [enable_sniff="no"]) | |
1125 AC_MSG_RESULT($enable_sniff) | |
1126 if test "$enable_sniff" = "yes"; then | |
1127 AC_DEFINE(FEAT_SNIFF) | |
1128 SNIFF_SRC="if_sniff.c" | |
1129 AC_SUBST(SNIFF_SRC) | |
1130 SNIFF_OBJ="objects/if_sniff.o" | |
1131 AC_SUBST(SNIFF_OBJ) | |
1132 fi | |
1133 | |
1134 AC_MSG_CHECKING(--enable-multibyte argument) | |
1135 AC_ARG_ENABLE(multibyte, | |
1136 [ --enable-multibyte Include multibyte editing support.], , | |
1137 [enable_multibyte="no"]) | |
1138 AC_MSG_RESULT($enable_multibyte) | |
1139 if test "$enable_multibyte" = "yes"; then | |
1140 AC_DEFINE(FEAT_MBYTE) | |
1141 fi | |
1142 | |
1143 AC_MSG_CHECKING(--enable-hangulinput argument) | |
1144 AC_ARG_ENABLE(hangulinput, | |
1145 [ --enable-hangulinput Include Hangul input support.], , | |
1146 [enable_hangulinput="no"]) | |
1147 AC_MSG_RESULT($enable_hangulinput) | |
1148 | |
1149 AC_MSG_CHECKING(--enable-xim argument) | |
1150 AC_ARG_ENABLE(xim, | |
1151 [ --enable-xim Include XIM input support.], | |
1152 AC_MSG_RESULT($enable_xim), | |
1153 [enable_xim="auto"; AC_MSG_RESULT(defaulting to auto)]) | |
1154 | |
1155 AC_MSG_CHECKING(--enable-fontset argument) | |
1156 AC_ARG_ENABLE(fontset, | |
1157 [ --enable-fontset Include X fontset output support.], , | |
1158 [enable_fontset="no"]) | |
1159 AC_MSG_RESULT($enable_fontset) | |
1160 dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI | |
1161 | |
1162 test -z "$with_x" && with_x=yes | |
1163 test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes | |
1164 if test "$with_x" = no; then | |
1165 AC_MSG_RESULT(defaulting to: don't HAVE_X11) | |
1166 else | |
1167 dnl Do this check early, so that its failure can override user requests. | |
1168 | |
1169 AC_PATH_PROG(xmkmfpath, xmkmf) | |
1170 | |
1171 AC_PATH_XTRA | |
1172 | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
1173 dnl On z/OS Unix the X libraries are DLLs. To use them the code must |
7 | 1174 dnl be compiled with a special option. |
1175 dnl Also add SM, ICE and Xmu to X_EXTRA_LIBS. | |
2247
c40cd9aad546
Add patch to improve support of z/OS (OS/390). (Ralf Schandl)
Bram Moolenaar <bram@vim.org>
parents:
2241
diff
changeset
|
1176 if test "$zOSUnix" = "yes"; then |
7 | 1177 CFLAGS="$CFLAGS -W c,dll" |
1178 LDFLAGS="$LDFLAGS -W l,dll" | |
1179 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu" | |
1180 fi | |
1181 | |
1182 dnl On my HPUX system the X include dir is found, but the lib dir not. | |
1183 dnl This is a desparate try to fix this. | |
1184 | |
1185 if test -d "$x_includes" && test ! -d "$x_libraries"; then | |
1186 x_libraries=`echo "$x_includes" | sed s/include/lib/` | |
1187 AC_MSG_RESULT(Corrected X libraries to $x_libraries) | |
1188 X_LIBS="$X_LIBS -L$x_libraries" | |
1189 if test "`(uname) 2>/dev/null`" = SunOS && | |
1190 uname -r | grep '^5' >/dev/null; then | |
1191 X_LIBS="$X_LIBS -R $x_libraries" | |
1192 fi | |
1193 fi | |
1194 | |
1195 if test -d "$x_libraries" && test ! -d "$x_includes"; then | |
1196 x_includes=`echo "$x_libraries" | sed s/lib/include/` | |
1197 AC_MSG_RESULT(Corrected X includes to $x_includes) | |
1198 X_CFLAGS="$X_CFLAGS -I$x_includes" | |
1199 fi | |
1200 | |
1201 dnl Remove "-I/usr/include " from X_CFLAGS, should not be needed. | |
1202 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`" | |
1203 dnl Remove "-L/usr/lib " from X_LIBS, should not be needed. | |
1204 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`" | |
1205 dnl Same for "-R/usr/lib ". | |
1206 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`" | |
1207 | |
1208 | |
1209 dnl Check if the X11 header files are correctly installed. On some systems | |
1649 | 1210 dnl Xlib.h includes files that don't exist. On some systems X11/Intrinsic.h |
1211 dnl is missing. | |
7 | 1212 AC_MSG_CHECKING(if X11 header files can be found) |
1213 cflags_save=$CFLAGS | |
1214 CFLAGS="$CFLAGS $X_CFLAGS" | |
1649 | 1215 AC_TRY_COMPILE([#include <X11/Xlib.h> |
1216 #include <X11/Intrinsic.h>], , | |
7 | 1217 AC_MSG_RESULT(yes), |
1218 AC_MSG_RESULT(no); no_x=yes) | |
1219 CFLAGS=$cflags_save | |
1220 | |
1221 if test "${no_x-no}" = yes; then | |
1222 with_x=no | |
1223 else | |
1224 AC_DEFINE(HAVE_X11) | |
1225 X_LIB="-lXt -lX11"; | |
1226 AC_SUBST(X_LIB) | |
1227 | |
1228 ac_save_LDFLAGS="$LDFLAGS" | |
1229 LDFLAGS="-L$x_libraries $LDFLAGS" | |
1230 | |
1231 dnl Check for -lXdmcp (needed on SunOS 4.1.4) | |
1232 dnl For HP-UX 10.20 it must be before -lSM -lICE | |
1233 AC_CHECK_LIB(Xdmcp, _XdmcpAuthDoIt, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"],, | |
1234 [-lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp]) | |
1235 | |
1236 dnl Some systems need -lnsl -lsocket when testing for ICE. | |
1237 dnl The check above doesn't do this, try here (again). Also needed to get | |
1238 dnl them after Xdmcp. link.sh will remove them when not needed. | |
1239 dnl Check for other function than above to avoid the cached value | |
1240 AC_CHECK_LIB(ICE, IceOpenConnection, | |
1241 [X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"],, [$X_EXTRA_LIBS]) | |
1242 | |
1243 dnl Check for -lXpm (needed for some versions of Motif) | |
1244 LDFLAGS="$X_LIBS $ac_save_LDFLAGS" | |
1245 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [X_PRE_LIBS="$X_PRE_LIBS -lXpm"],, | |
1246 [-lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS]) | |
1247 | |
1248 dnl Check that the X11 header files don't use implicit declarations | |
1249 AC_MSG_CHECKING(if X11 header files implicitly declare return values) | |
1250 cflags_save=$CFLAGS | |
1251 CFLAGS="$CFLAGS $X_CFLAGS -Werror" | |
1252 AC_TRY_COMPILE([#include <X11/Xlib.h>], , | |
1253 AC_MSG_RESULT(no), | |
1254 CFLAGS="$CFLAGS -Wno-implicit-int" | |
1255 AC_TRY_COMPILE([#include <X11/Xlib.h>], , | |
1256 AC_MSG_RESULT(yes); cflags_save="$cflags_save -Wno-implicit-int", | |
1257 AC_MSG_RESULT(test failed) | |
1258 ) | |
1259 ) | |
1260 CFLAGS=$cflags_save | |
1261 | |
1262 LDFLAGS="$ac_save_LDFLAGS" | |
1263 | |
1887 | 1264 AC_MSG_CHECKING(size of wchar_t is 2 bytes) |
1265 AC_CACHE_VAL(ac_cv_small_wchar_t, | |
1266 [AC_TRY_RUN([ | |
1267 #include <X11/Xlib.h> | |
1268 #if STDC_HEADERS | |
1269 # include <stdlib.h> | |
1270 # include <stddef.h> | |
1271 #endif | |
1272 main() | |
1273 { | |
1274 if (sizeof(wchar_t) <= 2) | |
1275 exit(1); | |
1276 exit(0); | |
1277 }], | |
1278 ac_cv_small_wchar_t="no", | |
1279 ac_cv_small_wchar_t="yes", | |
1280 AC_MSG_ERROR(failed to compile test program))]) | |
1281 AC_MSG_RESULT($ac_cv_small_wchar_t) | |
1282 if test "x$ac_cv_small_wchar_t" = "xyes" ; then | |
1283 AC_DEFINE(SMALL_WCHAR_T) | |
1284 fi | |
1285 | |
7 | 1286 fi |
1287 fi | |
1288 | |
270 | 1289 test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no |
7 | 1290 |
1291 AC_MSG_CHECKING(--enable-gui argument) | |
1292 AC_ARG_ENABLE(gui, | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1293 [ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk2/gnome2/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto") |
7 | 1294 |
1295 dnl Canonicalize the --enable-gui= argument so that it can be easily compared. | |
1296 dnl Do not use character classes for portability with old tools. | |
1297 enable_gui_canon=`echo "_$enable_gui" | \ | |
1298 sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | |
1299 | |
1300 dnl Skip everything by default. | |
1301 SKIP_GTK2=YES | |
1302 SKIP_GNOME=YES | |
1303 SKIP_MOTIF=YES | |
1304 SKIP_ATHENA=YES | |
1305 SKIP_NEXTAW=YES | |
1306 SKIP_PHOTON=YES | |
1307 SKIP_CARBON=YES | |
1308 GUITYPE=NONE | |
1309 | |
67 | 1310 if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then |
7 | 1311 SKIP_PHOTON= |
1312 case "$enable_gui_canon" in | |
1313 no) AC_MSG_RESULT(no GUI support) | |
1314 SKIP_PHOTON=YES ;; | |
1315 yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; | |
1316 auto) AC_MSG_RESULT(auto - automatic GUI support) ;; | |
1317 photon) AC_MSG_RESULT(Photon GUI support) ;; | |
1318 *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) | |
1319 SKIP_PHOTON=YES ;; | |
1320 esac | |
1321 | |
1322 elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then | |
1323 SKIP_CARBON= | |
1324 case "$enable_gui_canon" in | |
1325 no) AC_MSG_RESULT(no GUI support) | |
1326 SKIP_CARBON=YES ;; | |
1327 yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;; | |
1328 auto) AC_MSG_RESULT(auto - automatic GUI support) ;; | |
1329 carbon) AC_MSG_RESULT(Carbon GUI support) ;; | |
1330 *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) | |
1331 SKIP_CARBON=YES ;; | |
1332 esac | |
1333 | |
1334 else | |
1335 | |
1336 case "$enable_gui_canon" in | |
1337 no|none) AC_MSG_RESULT(no GUI support) ;; | |
1338 yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support) | |
1339 SKIP_GTK2= | |
1340 SKIP_GNOME= | |
1341 SKIP_MOTIF= | |
1342 SKIP_ATHENA= | |
1343 SKIP_NEXTAW= | |
1344 SKIP_CARBON=;; | |
1345 gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support) | |
1346 SKIP_GTK2=;; | |
1347 gnome2) AC_MSG_RESULT(GNOME 2.x GUI support) | |
1348 SKIP_GNOME= | |
1349 SKIP_GTK2=;; | |
1350 motif) AC_MSG_RESULT(Motif GUI support) | |
1351 SKIP_MOTIF=;; | |
1352 athena) AC_MSG_RESULT(Athena GUI support) | |
1353 SKIP_ATHENA=;; | |
1354 nextaw) AC_MSG_RESULT(neXtaw GUI support) | |
1355 SKIP_NEXTAW=;; | |
1356 *) AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;; | |
1357 esac | |
1358 | |
1359 fi | |
1360 | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1361 if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \ |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1362 -a "$enable_gui_canon" != "gnome2"; then |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1363 AC_MSG_CHECKING(whether or not to look for GTK+ 2) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1364 AC_ARG_ENABLE(gtk2-check, |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1365 [ --enable-gtk2-check If auto-select GUI, check for GTK+ 2 [default=yes]], |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1366 , enable_gtk2_check="yes") |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1367 AC_MSG_RESULT($enable_gtk2_check) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1368 if test "x$enable_gtk2_check" = "xno"; then |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1369 SKIP_GTK2=YES |
7 | 1370 SKIP_GNOME=YES |
1371 fi | |
1372 fi | |
1373 | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1374 if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then |
7 | 1375 AC_MSG_CHECKING(whether or not to look for GNOME) |
1376 AC_ARG_ENABLE(gnome-check, | |
1377 [ --enable-gnome-check If GTK GUI, check for GNOME [default=no]], | |
1378 , enable_gnome_check="no") | |
1379 AC_MSG_RESULT($enable_gnome_check) | |
1380 if test "x$enable_gnome_check" = "xno"; then | |
1381 SKIP_GNOME=YES | |
1382 fi | |
1383 fi | |
1384 | |
1385 if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then | |
1386 AC_MSG_CHECKING(whether or not to look for Motif) | |
1387 AC_ARG_ENABLE(motif-check, | |
1388 [ --enable-motif-check If auto-select GUI, check for Motif [default=yes]], | |
1389 , enable_motif_check="yes") | |
1390 AC_MSG_RESULT($enable_motif_check) | |
1391 if test "x$enable_motif_check" = "xno"; then | |
1392 SKIP_MOTIF=YES | |
1393 fi | |
1394 fi | |
1395 | |
1396 if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then | |
1397 AC_MSG_CHECKING(whether or not to look for Athena) | |
1398 AC_ARG_ENABLE(athena-check, | |
1399 [ --enable-athena-check If auto-select GUI, check for Athena [default=yes]], | |
1400 , enable_athena_check="yes") | |
1401 AC_MSG_RESULT($enable_athena_check) | |
1402 if test "x$enable_athena_check" = "xno"; then | |
1403 SKIP_ATHENA=YES | |
1404 fi | |
1405 fi | |
1406 | |
1407 if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then | |
1408 AC_MSG_CHECKING(whether or not to look for neXtaw) | |
1409 AC_ARG_ENABLE(nextaw-check, | |
1410 [ --enable-nextaw-check If auto-select GUI, check for neXtaw [default=yes]], | |
1411 , enable_nextaw_check="yes") | |
1412 AC_MSG_RESULT($enable_nextaw_check); | |
1413 if test "x$enable_nextaw_check" = "xno"; then | |
1414 SKIP_NEXTAW=YES | |
1415 fi | |
1416 fi | |
1417 | |
1418 if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then | |
1419 AC_MSG_CHECKING(whether or not to look for Carbon) | |
1420 AC_ARG_ENABLE(carbon-check, | |
1421 [ --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]], | |
1422 , enable_carbon_check="yes") | |
1423 AC_MSG_RESULT($enable_carbon_check); | |
1424 if test "x$enable_carbon_check" = "xno"; then | |
1425 SKIP_CARBON=YES | |
1426 fi | |
1427 fi | |
1428 | |
11 | 1429 |
7 | 1430 if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then |
1431 AC_MSG_CHECKING(for Carbon GUI) | |
864 | 1432 dnl already did the check, just give the message |
7 | 1433 AC_MSG_RESULT(yes); |
1434 GUITYPE=CARBONGUI | |
502 | 1435 if test "$VIMNAME" = "vim"; then |
1436 VIMNAME=Vim | |
1437 fi | |
864 | 1438 |
1439 dnl Default install directory is not /usr/local | |
1440 if test x$prefix = xNONE; then | |
1441 prefix=/Applications | |
1442 fi | |
1443 | |
1444 dnl Sorry for the hard coded default | |
1445 datadir='${prefix}/Vim.app/Contents/Resources' | |
1446 | |
7 | 1447 dnl skip everything else |
1448 SKIP_GTK2=YES; | |
1449 SKIP_GNOME=YES; | |
1450 SKIP_MOTIF=YES; | |
1451 SKIP_ATHENA=YES; | |
1452 SKIP_NEXTAW=YES; | |
1453 SKIP_PHOTON=YES; | |
1454 SKIP_CARBON=YES | |
1455 fi | |
1456 | |
1457 dnl define an autoconf function to check for a specified version of GTK, and | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1458 dnl try to compile/link a GTK program. |
7 | 1459 dnl |
1460 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | |
29 | 1461 dnl Test for GTK, and define GTK_CFLAGS, GTK_LIBDIR and GTK_LIBS |
7 | 1462 dnl |
1463 AC_DEFUN(AM_PATH_GTK, | |
1464 [ | |
1465 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then | |
1466 { | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1467 min_gtk_version=ifelse([$1], ,2.2.0,$1) |
7 | 1468 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) |
1469 no_gtk="" | |
1470 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \ | |
1471 && $PKG_CONFIG --exists gtk+-2.0; then | |
1472 { | |
1473 dnl We should be using PKG_CHECK_MODULES() instead of this hack. | |
1474 dnl But I guess the dependency on pkgconfig.m4 is not wanted or | |
1475 dnl something like that. | |
1476 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` | |
29 | 1477 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0` |
7 | 1478 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0` |
1479 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | |
1480 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | |
1481 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | |
1482 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | |
1483 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | |
1484 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | |
1485 } | |
1486 else | |
1487 no_gtk=yes | |
1488 fi | |
1489 | |
1490 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then | |
1491 { | |
1492 ac_save_CFLAGS="$CFLAGS" | |
1493 ac_save_LIBS="$LIBS" | |
1494 CFLAGS="$CFLAGS $GTK_CFLAGS" | |
1495 LIBS="$LIBS $GTK_LIBS" | |
1496 | |
1497 dnl | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1498 dnl Now check if the installed GTK is sufficiently new. |
7 | 1499 dnl |
1500 rm -f conf.gtktest | |
1501 AC_TRY_RUN([ | |
1502 #include <gtk/gtk.h> | |
1503 #include <stdio.h> | |
1621 | 1504 #if STDC_HEADERS |
1505 # include <stdlib.h> | |
1506 # include <stddef.h> | |
1507 #endif | |
7 | 1508 |
1509 int | |
1510 main () | |
1511 { | |
1512 int major, minor, micro; | |
1513 char *tmp_version; | |
1514 | |
1515 system ("touch conf.gtktest"); | |
1516 | |
1517 /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
1518 tmp_version = g_strdup("$min_gtk_version"); | |
1519 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
1520 printf("%s, bad version string\n", "$min_gtk_version"); | |
1521 exit(1); | |
1522 } | |
1523 | |
1524 if ((gtk_major_version > major) || | |
1525 ((gtk_major_version == major) && (gtk_minor_version > minor)) || | |
1526 ((gtk_major_version == major) && (gtk_minor_version == minor) && | |
1527 (gtk_micro_version >= micro))) | |
1528 { | |
1529 return 0; | |
1530 } | |
1531 return 1; | |
1532 } | |
1533 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
1534 CFLAGS="$ac_save_CFLAGS" | |
1535 LIBS="$ac_save_LIBS" | |
1536 } | |
1537 fi | |
1538 if test "x$no_gtk" = x ; then | |
1539 if test "x$enable_gtktest" = "xyes"; then | |
1540 AC_MSG_RESULT(yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version) | |
1541 else | |
1542 AC_MSG_RESULT(found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version) | |
1543 fi | |
1544 ifelse([$2], , :, [$2]) | |
1545 else | |
1546 { | |
1547 AC_MSG_RESULT(no) | |
1548 GTK_CFLAGS="" | |
1549 GTK_LIBS="" | |
1550 ifelse([$3], , :, [$3]) | |
1551 } | |
1552 fi | |
1553 } | |
1554 else | |
1555 GTK_CFLAGS="" | |
1556 GTK_LIBS="" | |
1557 ifelse([$3], , :, [$3]) | |
1558 fi | |
1559 AC_SUBST(GTK_CFLAGS) | |
1560 AC_SUBST(GTK_LIBS) | |
1561 rm -f conf.gtktest | |
1562 ]) | |
1563 | |
1564 dnl --------------------------------------------------------------------------- | |
1565 dnl gnome | |
1566 dnl --------------------------------------------------------------------------- | |
1567 AC_DEFUN([GNOME_INIT_HOOK], | |
1568 [ | |
1569 AC_SUBST(GNOME_LIBS) | |
1570 AC_SUBST(GNOME_LIBDIR) | |
1571 AC_SUBST(GNOME_INCLUDEDIR) | |
1572 | |
1573 AC_ARG_WITH(gnome-includes, | |
1574 [ --with-gnome-includes=DIR Specify location of GNOME headers], | |
1575 [CFLAGS="$CFLAGS -I$withval"] | |
1576 ) | |
1577 | |
1578 AC_ARG_WITH(gnome-libs, | |
1579 [ --with-gnome-libs=DIR Specify location of GNOME libs], | |
1580 [LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval] | |
1581 ) | |
1582 | |
1583 AC_ARG_WITH(gnome, | |
1584 [ --with-gnome Specify prefix for GNOME files], | |
1585 if test x$withval = xyes; then | |
1586 want_gnome=yes | |
1587 ifelse([$1], [], :, [$1]) | |
1588 else | |
1589 if test "x$withval" = xno; then | |
1590 want_gnome=no | |
1591 else | |
1592 want_gnome=yes | |
1593 LDFLAGS="$LDFLAGS -L$withval/lib" | |
1594 CFLAGS="$CFLAGS -I$withval/include" | |
1595 gnome_prefix=$withval/lib | |
1596 fi | |
1597 fi, | |
1598 want_gnome=yes) | |
1599 | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1600 if test "x$want_gnome" = xyes; then |
7 | 1601 { |
1602 AC_MSG_CHECKING(for libgnomeui-2.0) | |
1603 if $PKG_CONFIG --exists libgnomeui-2.0; then | |
1604 AC_MSG_RESULT(yes) | |
1605 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0` | |
1606 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0` | |
1607 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0` | |
856 | 1608 |
782 | 1609 dnl On FreeBSD we need -pthread but pkg-config doesn't include it. |
1610 dnl This might not be the right way but it works for me... | |
1611 AC_MSG_CHECKING(for FreeBSD) | |
1612 if test "`(uname) 2>/dev/null`" = FreeBSD; then | |
1613 AC_MSG_RESULT(yes, adding -pthread) | |
856 | 1614 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE" |
782 | 1615 GNOME_LIBS="$GNOME_LIBS -pthread" |
1616 else | |
1617 AC_MSG_RESULT(no) | |
1618 fi | |
7 | 1619 $1 |
1620 else | |
1621 AC_MSG_RESULT(not found) | |
1622 if test "x$2" = xfail; then | |
1623 AC_MSG_ERROR(Could not find libgnomeui-2.0 via pkg-config) | |
1624 fi | |
1625 fi | |
1626 } | |
1627 fi | |
1628 ]) | |
1629 | |
1630 AC_DEFUN([GNOME_INIT],[ | |
1631 GNOME_INIT_HOOK([],fail) | |
1632 ]) | |
1633 | |
1634 | |
1635 dnl --------------------------------------------------------------------------- | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1636 dnl Check for GTK2. If it fails, then continue on for Motif as before... |
7 | 1637 dnl --------------------------------------------------------------------------- |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1638 if test -z "$SKIP_GTK2"; then |
7 | 1639 |
1640 AC_MSG_CHECKING(--disable-gtktest argument) | |
1641 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], | |
1642 , enable_gtktest=yes) | |
1643 if test "x$enable_gtktest" = "xyes" ; then | |
1644 AC_MSG_RESULT(gtk test enabled) | |
1645 else | |
1646 AC_MSG_RESULT(gtk test disabled) | |
1647 fi | |
1648 | |
1649 if test "X$PKG_CONFIG" = "X"; then | |
1650 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | |
1651 fi | |
1652 | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1653 if test "x$PKG_CONFIG" != "xno"; then |
7 | 1654 dnl First try finding version 2.2.0 or later. The 2.0.x series has |
1655 dnl problems (bold fonts, --remote doesn't work). | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1656 AM_PATH_GTK(2.2.0, |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1657 [GUI_LIB_LOC="$GTK_LIBDIR" |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1658 GTK_LIBNAME="$GTK_LIBS" |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1659 GUI_INC_LOC="$GTK_CFLAGS"], ) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1660 if test "x$GTK_CFLAGS" != "x"; then |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1661 SKIP_ATHENA=YES |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1662 SKIP_NEXTAW=YES |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1663 SKIP_MOTIF=YES |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1664 GUITYPE=GTK |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1665 AC_SUBST(GTK_LIBNAME) |
7 | 1666 fi |
1667 fi | |
1668 if test "x$GUITYPE" = "xGTK"; then | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1669 if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \ |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1670 || test "0$gtk_minor_version" -ge 2; then |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1671 AC_DEFINE(HAVE_GTK_MULTIHEAD) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1672 fi |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1673 dnl |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1674 dnl if GTK exists, then check for GNOME. |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1675 dnl |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1676 if test -z "$SKIP_GNOME"; then |
7 | 1677 { |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1678 GNOME_INIT_HOOK([have_gnome=yes]) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1679 if test "x$have_gnome" = xyes ; then |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1680 AC_DEFINE(FEAT_GUI_GNOME) |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1681 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR" |
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1682 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS" |
7 | 1683 fi |
1684 } | |
1685 fi | |
1686 fi | |
1687 fi | |
1688 | |
1689 dnl Check for Motif include files location. | |
1690 dnl The LAST one found is used, this makes the highest version to be used, | |
1691 dnl e.g. when Motif1.2 and Motif2.0 are both present. | |
1692 | |
1693 if test -z "$SKIP_MOTIF"; then | |
1694 gui_XXX="/usr/XXX/Motif* /usr/Motif*/XXX /usr/XXX /usr/shlib /usr/X11*/XXX /usr/XXX/X11* /usr/dt/XXX /local/Motif*/XXX /local/XXX/Motif* /usr/local/Motif*/XXX /usr/local/XXX/Motif* /usr/local/XXX /usr/local/X11*/XXX /usr/local/LessTif/Motif*/XXX $MOTIFHOME/XXX" | |
1695 dnl Remove "-I" from before $GUI_INC_LOC if it's there | |
1696 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`" | |
1697 | |
1698 AC_MSG_CHECKING(for location of Motif GUI includes) | |
1699 gui_includes="`echo $x_includes|sed 's%/[^/][^/]*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC" | |
1700 GUI_INC_LOC= | |
1701 for try in $gui_includes; do | |
1702 if test -f "$try/Xm/Xm.h"; then | |
1703 GUI_INC_LOC=$try | |
1704 fi | |
1705 done | |
1706 if test -n "$GUI_INC_LOC"; then | |
1707 if test "$GUI_INC_LOC" = /usr/include; then | |
1708 GUI_INC_LOC= | |
1709 AC_MSG_RESULT(in default path) | |
1710 else | |
1711 AC_MSG_RESULT($GUI_INC_LOC) | |
1712 fi | |
1713 else | |
1714 AC_MSG_RESULT(<not found>) | |
1715 SKIP_MOTIF=YES | |
1716 fi | |
1717 fi | |
1718 | |
1719 dnl Check for Motif library files location. In the same order as the include | |
1720 dnl files, to avoid a mixup if several versions are present | |
1721 | |
1722 if test -z "$SKIP_MOTIF"; then | |
1723 AC_MSG_CHECKING(--with-motif-lib argument) | |
1724 AC_ARG_WITH(motif-lib, | |
1725 [ --with-motif-lib=STRING Library for Motif ], | |
1726 [ MOTIF_LIBNAME="${withval}" ] ) | |
1727 | |
1728 if test -n "$MOTIF_LIBNAME"; then | |
1729 AC_MSG_RESULT($MOTIF_LIBNAME) | |
1730 GUI_LIB_LOC= | |
1731 else | |
1732 AC_MSG_RESULT(no) | |
1733 | |
1734 dnl Remove "-L" from before $GUI_LIB_LOC if it's there | |
1735 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`" | |
1736 | |
1737 AC_MSG_CHECKING(for location of Motif GUI libs) | |
1738 gui_libs="`echo $x_libraries|sed 's%/[^/][^/]*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC" | |
1739 GUI_LIB_LOC= | |
1740 for try in $gui_libs; do | |
14 | 1741 for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do |
7 | 1742 if test -f "$libtry"; then |
1743 GUI_LIB_LOC=$try | |
1744 fi | |
1745 done | |
1746 done | |
1747 if test -n "$GUI_LIB_LOC"; then | |
1748 dnl Remove /usr/lib, it causes trouble on some systems | |
1749 if test "$GUI_LIB_LOC" = /usr/lib; then | |
1750 GUI_LIB_LOC= | |
1751 AC_MSG_RESULT(in default path) | |
1752 else | |
1753 if test -n "$GUI_LIB_LOC"; then | |
1754 AC_MSG_RESULT($GUI_LIB_LOC) | |
1755 if test "`(uname) 2>/dev/null`" = SunOS && | |
1756 uname -r | grep '^5' >/dev/null; then | |
1757 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC" | |
1758 fi | |
1759 fi | |
1760 fi | |
1761 MOTIF_LIBNAME=-lXm | |
1762 else | |
1763 AC_MSG_RESULT(<not found>) | |
1764 SKIP_MOTIF=YES | |
1765 fi | |
1766 fi | |
1767 fi | |
1768 | |
1769 if test -z "$SKIP_MOTIF"; then | |
1770 SKIP_ATHENA=YES | |
1771 SKIP_NEXTAW=YES | |
1772 GUITYPE=MOTIF | |
1773 AC_SUBST(MOTIF_LIBNAME) | |
1774 fi | |
1775 | |
1776 dnl Check if the Athena files can be found | |
1777 | |
1778 GUI_X_LIBS= | |
1779 | |
1780 if test -z "$SKIP_ATHENA"; then | |
1781 AC_MSG_CHECKING(if Athena header files can be found) | |
1782 cflags_save=$CFLAGS | |
1783 CFLAGS="$CFLAGS $X_CFLAGS" | |
1784 AC_TRY_COMPILE([ | |
1785 #include <X11/Intrinsic.h> | |
1786 #include <X11/Xaw/Paned.h>], , | |
1787 AC_MSG_RESULT(yes), | |
1788 AC_MSG_RESULT(no); SKIP_ATHENA=YES ) | |
1789 CFLAGS=$cflags_save | |
1790 fi | |
1791 | |
1792 if test -z "$SKIP_ATHENA"; then | |
1793 GUITYPE=ATHENA | |
1794 fi | |
1795 | |
1796 if test -z "$SKIP_NEXTAW"; then | |
1797 AC_MSG_CHECKING(if neXtaw header files can be found) | |
1798 cflags_save=$CFLAGS | |
1799 CFLAGS="$CFLAGS $X_CFLAGS" | |
1800 AC_TRY_COMPILE([ | |
1801 #include <X11/Intrinsic.h> | |
1802 #include <X11/neXtaw/Paned.h>], , | |
1803 AC_MSG_RESULT(yes), | |
1804 AC_MSG_RESULT(no); SKIP_NEXTAW=YES ) | |
1805 CFLAGS=$cflags_save | |
1806 fi | |
1807 | |
1808 if test -z "$SKIP_NEXTAW"; then | |
1809 GUITYPE=NEXTAW | |
1810 fi | |
1811 | |
1812 if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then | |
1813 dnl Prepend -I and -L to $GUI_INC_LOC and $GUI_LIB_LOC if not empty | |
1814 dnl Avoid adding it when it twice | |
1815 if test -n "$GUI_INC_LOC"; then | |
1816 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`" | |
1817 fi | |
1818 if test -n "$GUI_LIB_LOC"; then | |
1819 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`" | |
1820 fi | |
1821 | |
1822 dnl Check for -lXext and then for -lXmu | |
1823 ldflags_save=$LDFLAGS | |
1824 LDFLAGS="$X_LIBS $LDFLAGS" | |
1825 AC_CHECK_LIB(Xext, XShapeQueryExtension, [GUI_X_LIBS="-lXext"],, | |
1826 [-lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) | |
1827 dnl For Solaris we need -lw and -ldl before linking with -lXmu works. | |
1828 AC_CHECK_LIB(w, wslen, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"],, | |
1829 [$GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) | |
1830 AC_CHECK_LIB(dl, dlsym, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"],, | |
1831 [$GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) | |
1832 AC_CHECK_LIB(Xmu, XmuCreateStippledPixmap, [GUI_X_LIBS="-lXmu $GUI_X_LIBS"],, | |
1833 [$GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) | |
1834 if test -z "$SKIP_MOTIF"; then | |
1835 AC_CHECK_LIB(Xp, XpEndJob, [GUI_X_LIBS="-lXp $GUI_X_LIBS"],, | |
1836 [$GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) | |
1837 fi | |
1838 LDFLAGS=$ldflags_save | |
1839 | |
1840 dnl Execute xmkmf to figure out if -DNARROWPROTO is needed. | |
1841 AC_MSG_CHECKING(for extra X11 defines) | |
1842 NARROW_PROTO= | |
1843 rm -fr conftestdir | |
1844 if mkdir conftestdir; then | |
1845 cd conftestdir | |
1846 cat > Imakefile <<'EOF' | |
1847 acfindx: | |
1848 @echo 'NARROW_PROTO="${PROTO_DEFINES}"' | |
1849 EOF | |
1850 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
1851 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
1852 fi | |
1853 cd .. | |
1854 rm -fr conftestdir | |
1855 fi | |
1856 if test -z "$NARROW_PROTO"; then | |
1857 AC_MSG_RESULT(no) | |
1858 else | |
1859 AC_MSG_RESULT($NARROW_PROTO) | |
1860 fi | |
1861 AC_SUBST(NARROW_PROTO) | |
1862 fi | |
1863 | |
1864 dnl Look for XSMP support - but don't necessarily restrict it to X11 GUIs | |
1865 dnl use the X11 include path | |
1866 if test "$enable_xsmp" = "yes"; then | |
1867 cppflags_save=$CPPFLAGS | |
1868 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
1869 AC_CHECK_HEADERS(X11/SM/SMlib.h) | |
1870 CPPFLAGS=$cppflags_save | |
1871 fi | |
1872 | |
1873 | |
2285
69064995302a
Change SKIP_GTK to SKIP_GTK2 in configure.
Bram Moolenaar <bram@vim.org>
parents:
2277
diff
changeset
|
1874 if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2"; then |
7 | 1875 dnl Check for X11/xpm.h and X11/Sunkeysym.h with the GUI include path |
1876 cppflags_save=$CPPFLAGS | |
1877 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
1878 AC_CHECK_HEADERS(X11/xpm.h X11/Sunkeysym.h) | |
1879 | |
1880 dnl automatically disable XIM when XIMtext isn't in X11/Xlib.h | |
1881 if test ! "$enable_xim" = "no"; then | |
1882 AC_MSG_CHECKING(for XIMText in X11/Xlib.h) | |
1883 AC_EGREP_CPP(XIMText, [#include <X11/Xlib.h>], | |
1884 AC_MSG_RESULT(yes), | |
1885 AC_MSG_RESULT(no; xim has been disabled); enable_xim = "no") | |
1886 fi | |
1887 CPPFLAGS=$cppflags_save | |
1888 | |
1889 dnl automatically enable XIM when hangul input isn't enabled | |
1890 if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \ | |
1891 -a "x$GUITYPE" != "xNONE" ; then | |
1892 AC_MSG_RESULT(X GUI selected; xim has been enabled) | |
1893 enable_xim="yes" | |
1894 fi | |
1895 fi | |
1896 | |
1897 if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then | |
1898 cppflags_save=$CPPFLAGS | |
1899 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
148 | 1900 dnl Xmu/Editres.h may exist but can only be used after including Intrinsic.h |
1901 AC_MSG_CHECKING([for X11/Xmu/Editres.h]) | |
1902 AC_TRY_COMPILE([ | |
1903 #include <X11/Intrinsic.h> | |
1904 #include <X11/Xmu/Editres.h>], | |
1905 [int i; i = 0;], | |
1906 AC_MSG_RESULT(yes) | |
1907 AC_DEFINE(HAVE_X11_XMU_EDITRES_H), | |
1908 AC_MSG_RESULT(no)) | |
7 | 1909 CPPFLAGS=$cppflags_save |
1910 fi | |
1911 | |
1912 dnl Only use the Xm directory when compiling Motif, don't use it for Athena | |
1913 if test -z "$SKIP_MOTIF"; then | |
1914 cppflags_save=$CPPFLAGS | |
1915 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
148 | 1916 AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \ |
838 | 1917 Xm/UnhighlightT.h Xm/Notebook.h) |
819 | 1918 |
1919 if test $ac_cv_header_Xm_XpmP_h = yes; then | |
1920 dnl Solaris uses XpmAttributes_21, very annoying. | |
1921 AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) | |
1922 AC_TRY_COMPILE([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;], | |
1923 AC_MSG_RESULT(yes); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes_21), | |
1924 AC_MSG_RESULT(no); AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) | |
1925 ) | |
1926 else | |
839 | 1927 AC_DEFINE(XPMATTRIBUTES_TYPE, XpmAttributes) |
819 | 1928 fi |
7 | 1929 CPPFLAGS=$cppflags_save |
1930 fi | |
1931 | |
1932 if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then | |
1933 AC_MSG_RESULT(no GUI selected; xim has been disabled) | |
1934 enable_xim="no" | |
1935 fi | |
1936 if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then | |
1937 AC_MSG_RESULT(no GUI selected; fontset has been disabled) | |
1938 enable_fontset="no" | |
1939 fi | |
2275
e4d849f4df03
Remove the old and not well supported GTK 1 code. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2247
diff
changeset
|
1940 if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then |
7 | 1941 AC_MSG_RESULT(GTK+ 2 GUI selected; fontset has been disabled) |
1942 enable_fontset="no" | |
1943 fi | |
1944 | |
1945 if test -z "$SKIP_PHOTON"; then | |
1946 GUITYPE=PHOTONGUI | |
1947 fi | |
1948 | |
1949 AC_SUBST(GUI_INC_LOC) | |
1950 AC_SUBST(GUI_LIB_LOC) | |
1951 AC_SUBST(GUITYPE) | |
1952 AC_SUBST(GUI_X_LIBS) | |
1953 | |
1954 if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then | |
1955 AC_MSG_ERROR([cannot use workshop without Motif]) | |
1956 fi | |
1957 | |
1958 dnl defining FEAT_XIM and FEAT_XFONTSET is delayed, so that they can be disabled | |
1959 if test "$enable_xim" = "yes"; then | |
1960 AC_DEFINE(FEAT_XIM) | |
1961 fi | |
1962 if test "$enable_fontset" = "yes"; then | |
1963 AC_DEFINE(FEAT_XFONTSET) | |
1964 fi | |
1965 | |
1966 | |
1967 dnl --------------------------------------------------------------------------- | |
1968 dnl end of GUI-checking | |
1969 dnl --------------------------------------------------------------------------- | |
1970 | |
1971 | |
1972 dnl Only really enable hangul input when GUI and XFONTSET are available | |
1973 if test "$enable_hangulinput" = "yes"; then | |
1974 if test "x$GUITYPE" = "xNONE"; then | |
1975 AC_MSG_RESULT(no GUI selected; hangul input has been disabled) | |
1976 enable_hangulinput=no | |
1977 else | |
1978 AC_DEFINE(FEAT_HANGULIN) | |
1979 HANGULIN_SRC=hangulin.c | |
1980 AC_SUBST(HANGULIN_SRC) | |
1981 HANGULIN_OBJ=objects/hangulin.o | |
1982 AC_SUBST(HANGULIN_OBJ) | |
1983 fi | |
1984 fi | |
1985 | |
1986 dnl Checks for libraries and include files. | |
1987 | |
1621 | 1988 AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken], |
1989 [ | |
1990 AC_RUN_IFELSE([[ | |
1991 #include "confdefs.h" | |
1992 #include <ctype.h> | |
1993 #if STDC_HEADERS | |
1994 # include <stdlib.h> | |
1995 # include <stddef.h> | |
1996 #endif | |
1997 main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } | |
1998 ]],[ | |
1999 vim_cv_toupper_broken=yes | |
2000 ],[ | |
2001 vim_cv_toupper_broken=no | |
2002 ],[ | |
2003 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_toupper_broken') | |
2004 ])]) | |
2005 | |
2006 if test "x$vim_cv_toupper_broken" = "xyes" ; then | |
2007 AC_DEFINE(BROKEN_TOUPPER) | |
2008 fi | |
7 | 2009 |
2010 AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) | |
1621 | 2011 AC_TRY_COMPILE([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");], |
7 | 2012 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME), |
2013 AC_MSG_RESULT(no)) | |
2014 | |
1876 | 2015 AC_MSG_CHECKING(whether __attribute__((unused)) is allowed) |
2016 AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));], | |
2017 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED), | |
2018 AC_MSG_RESULT(no)) | |
2019 | |
7 | 2020 dnl Checks for header files. |
2021 AC_CHECK_HEADER(elf.h, HAS_ELF=1) | |
2022 dnl AC_CHECK_HEADER(dwarf.h, SVR4=1) | |
2023 if test "$HAS_ELF" = 1; then | |
2024 AC_CHECK_LIB(elf, main) | |
2025 fi | |
2026 | |
2027 AC_HEADER_DIRENT | |
2028 | |
2029 dnl If sys/wait.h is not found it might still exist but not be POSIX | |
2030 dnl compliant. In that case we define HAVE_UNION_WAIT (for NeXT) | |
2031 if test $ac_cv_header_sys_wait_h = no; then | |
2032 AC_MSG_CHECKING([for sys/wait.h that defines union wait]) | |
2033 AC_TRY_COMPILE([#include <sys/wait.h>], | |
2034 [union wait xx, yy; xx = yy], | |
2035 AC_MSG_RESULT(yes) | |
2036 AC_DEFINE(HAVE_SYS_WAIT_H) | |
2037 AC_DEFINE(HAVE_UNION_WAIT), | |
2038 AC_MSG_RESULT(no)) | |
2039 fi | |
2040 | |
2199
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2041 AC_CHECK_HEADERS(stdarg.h stdint.h stdlib.h string.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2042 sys/select.h sys/utsname.h termcap.h fcntl.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2043 sgtty.h sys/ioctl.h sys/time.h sys/types.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2044 termio.h iconv.h inttypes.h langinfo.h math.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2045 unistd.h stropts.h errno.h sys/resource.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2046 sys/systeminfo.h locale.h sys/stream.h termios.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2047 libc.h sys/statfs.h poll.h sys/poll.h pwd.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2048 utime.h sys/param.h libintl.h libgen.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2049 util/debug.h util/msg18n.h frame.h sys/acl.h \ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2050 sys/access.h sys/sysinfo.h wchar.h wctype.h) |
7 | 2051 |
1649 | 2052 dnl sys/ptem.h depends on sys/stream.h on Solaris |
2053 AC_CHECK_HEADERS(sys/ptem.h, [], [], | |
2054 [#if defined HAVE_SYS_STREAM_H | |
2055 # include <sys/stream.h> | |
2056 #endif]) | |
2057 | |
1886 | 2058 dnl sys/sysctl.h depends on sys/param.h on OpenBSD |
2059 AC_CHECK_HEADERS(sys/sysctl.h, [], [], | |
2060 [#if defined HAVE_SYS_PARAM_H | |
2061 # include <sys/param.h> | |
2062 #endif]) | |
2063 | |
1649 | 2064 |
132 | 2065 dnl pthread_np.h may exist but can only be used after including pthread.h |
2066 AC_MSG_CHECKING([for pthread_np.h]) | |
2067 AC_TRY_COMPILE([ | |
2068 #include <pthread.h> | |
2069 #include <pthread_np.h>], | |
2070 [int i; i = 0;], | |
2071 AC_MSG_RESULT(yes) | |
2072 AC_DEFINE(HAVE_PTHREAD_NP_H), | |
2073 AC_MSG_RESULT(no)) | |
2074 | |
502 | 2075 AC_CHECK_HEADERS(strings.h) |
574 | 2076 if test "x$MACOSX" = "xyes"; then |
2077 dnl The strings.h file on OS/X contains a warning and nothing useful. | |
2078 AC_DEFINE(NO_STRINGS_WITH_STRING_H) | |
2079 else | |
7 | 2080 |
2081 dnl Check if strings.h and string.h can both be included when defined. | |
2082 AC_MSG_CHECKING([if strings.h can be included after string.h]) | |
2083 cppflags_save=$CPPFLAGS | |
2084 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | |
2085 AC_TRY_COMPILE([ | |
2086 #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO) | |
2087 # define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */ | |
2088 /* but don't do it on AIX 5.1 (Uribarri) */ | |
2089 #endif | |
2090 #ifdef HAVE_XM_XM_H | |
2091 # include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */ | |
2092 #endif | |
2093 #ifdef HAVE_STRING_H | |
2094 # include <string.h> | |
2095 #endif | |
2096 #if defined(HAVE_STRINGS_H) | |
2097 # include <strings.h> | |
2098 #endif | |
2099 ], [int i; i = 0;], | |
2100 AC_MSG_RESULT(yes), | |
2101 AC_DEFINE(NO_STRINGS_WITH_STRING_H) | |
2102 AC_MSG_RESULT(no)) | |
2103 CPPFLAGS=$cppflags_save | |
574 | 2104 fi |
7 | 2105 |
2106 dnl Checks for typedefs, structures, and compiler characteristics. | |
2107 AC_PROG_GCC_TRADITIONAL | |
2108 AC_C_CONST | |
1832 | 2109 AC_C_VOLATILE |
7 | 2110 AC_TYPE_MODE_T |
2111 AC_TYPE_OFF_T | |
2112 AC_TYPE_PID_T | |
2113 AC_TYPE_SIZE_T | |
2114 AC_TYPE_UID_T | |
2184
5028c4d6d825
Fixed encryption big/little endian test.
Bram Moolenaar <bram@vim.org>
parents:
2131
diff
changeset
|
2115 AC_TYPE_UINT32_T |
2199
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2116 |
7 | 2117 AC_HEADER_TIME |
2118 AC_CHECK_TYPE(ino_t, long) | |
2119 AC_CHECK_TYPE(dev_t, unsigned) | |
2184
5028c4d6d825
Fixed encryption big/little endian test.
Bram Moolenaar <bram@vim.org>
parents:
2131
diff
changeset
|
2120 AC_C_BIGENDIAN(,,,) |
7 | 2121 |
2122 AC_MSG_CHECKING(for rlim_t) | |
2123 if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then | |
2124 AC_MSG_RESULT([(cached) $ac_cv_type_rlim_t]) | |
2125 else | |
2126 AC_EGREP_CPP(dnl | |
2127 changequote(<<,>>)dnl | |
2128 <<(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]>>dnl | |
2129 changequote([,]), | |
2130 [ | |
2131 #include <sys/types.h> | |
2132 #if STDC_HEADERS | |
1621 | 2133 # include <stdlib.h> |
2134 # include <stddef.h> | |
7 | 2135 #endif |
2136 #ifdef HAVE_SYS_RESOURCE_H | |
1621 | 2137 # include <sys/resource.h> |
7 | 2138 #endif |
2139 ], ac_cv_type_rlim_t=yes, ac_cv_type_rlim_t=no) | |
2140 AC_MSG_RESULT($ac_cv_type_rlim_t) | |
2141 fi | |
2142 if test $ac_cv_type_rlim_t = no; then | |
2143 cat >> confdefs.h <<\EOF | |
2144 #define rlim_t unsigned long | |
2145 EOF | |
2146 fi | |
2147 | |
2148 AC_MSG_CHECKING(for stack_t) | |
2149 if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then | |
2150 AC_MSG_RESULT([(cached) $ac_cv_type_stack_t]) | |
2151 else | |
2152 AC_EGREP_CPP(stack_t, | |
2153 [ | |
2154 #include <sys/types.h> | |
2155 #if STDC_HEADERS | |
1621 | 2156 # include <stdlib.h> |
2157 # include <stddef.h> | |
7 | 2158 #endif |
2159 #include <signal.h> | |
2160 ], ac_cv_type_stack_t=yes, ac_cv_type_stack_t=no) | |
2161 AC_MSG_RESULT($ac_cv_type_stack_t) | |
2162 fi | |
2163 if test $ac_cv_type_stack_t = no; then | |
2164 cat >> confdefs.h <<\EOF | |
2165 #define stack_t struct sigaltstack | |
2166 EOF | |
2167 fi | |
2168 | |
2169 dnl BSDI uses ss_base while others use ss_sp for the stack pointer. | |
2170 AC_MSG_CHECKING(whether stack_t has an ss_base field) | |
2171 AC_TRY_COMPILE([ | |
2172 #include <sys/types.h> | |
2173 #if STDC_HEADERS | |
1621 | 2174 # include <stdlib.h> |
2175 # include <stddef.h> | |
7 | 2176 #endif |
2177 #include <signal.h> | |
2178 #include "confdefs.h" | |
2179 ], [stack_t sigstk; sigstk.ss_base = 0; ], | |
2180 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SS_BASE), | |
2181 AC_MSG_RESULT(no)) | |
2182 | |
2183 olibs="$LIBS" | |
2184 AC_MSG_CHECKING(--with-tlib argument) | |
2185 AC_ARG_WITH(tlib, [ --with-tlib=library terminal library to be used ],) | |
2186 if test -n "$with_tlib"; then | |
2187 AC_MSG_RESULT($with_tlib) | |
2188 LIBS="$LIBS -l$with_tlib" | |
39 | 2189 AC_MSG_CHECKING(for linking with $with_tlib library) |
2190 AC_TRY_LINK([], [], AC_MSG_RESULT(OK), AC_MSG_ERROR(FAILED)) | |
2191 dnl Need to check for tgetent() below. | |
2192 olibs="$LIBS" | |
7 | 2193 else |
39 | 2194 AC_MSG_RESULT([empty: automatic terminal library selection]) |
7 | 2195 dnl On HP-UX 10.10 termcap or termlib should be used instead of |
2196 dnl curses, because curses is much slower. | |
2197 dnl Newer versions of ncurses are preferred over anything. | |
2198 dnl Older versions of ncurses have bugs, get a new one! | |
2199 dnl Digital Unix (OSF1) should use curses (Ronald Schild). | |
997 | 2200 dnl On SCO Openserver should prefer termlib (Roger Cornelius). |
7 | 2201 case "`uname -s 2>/dev/null`" in |
997 | 2202 OSF1|SCO_SV) tlibs="ncurses curses termlib termcap";; |
7 | 2203 *) tlibs="ncurses termlib termcap curses";; |
2204 esac | |
2205 for libname in $tlibs; do | |
2206 AC_CHECK_LIB(${libname}, tgetent,,) | |
2207 if test "x$olibs" != "x$LIBS"; then | |
2208 dnl It's possible that a library is found but it doesn't work | |
2209 dnl e.g., shared library that cannot be found | |
2210 dnl compile and run a test program to be sure | |
2211 AC_TRY_RUN([ | |
2212 #ifdef HAVE_TERMCAP_H | |
2213 # include <termcap.h> | |
2214 #endif | |
1621 | 2215 #if STDC_HEADERS |
2216 # include <stdlib.h> | |
2217 # include <stddef.h> | |
2218 #endif | |
7 | 2219 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }], |
2220 res="OK", res="FAIL", res="FAIL") | |
2221 if test "$res" = "OK"; then | |
2222 break | |
2223 fi | |
2224 AC_MSG_RESULT($libname library is not usable) | |
2225 LIBS="$olibs" | |
2226 fi | |
2227 done | |
39 | 2228 if test "x$olibs" = "x$LIBS"; then |
2229 AC_MSG_RESULT(no terminal library found) | |
2230 fi | |
7 | 2231 fi |
39 | 2232 |
2233 if test "x$olibs" = "x$LIBS"; then | |
2234 AC_MSG_CHECKING([for tgetent()]) | |
282 | 2235 AC_TRY_LINK([], |
39 | 2236 [char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");], |
2237 AC_MSG_RESULT(yes), | |
2238 AC_MSG_ERROR([NOT FOUND! | |
2239 You need to install a terminal library; for example ncurses. | |
2240 Or specify the name of the library with --with-tlib.])) | |
2241 fi | |
2242 | |
1621 | 2243 AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo], |
2244 [ | |
2245 AC_RUN_IFELSE([[ | |
2246 #include "confdefs.h" | |
7 | 2247 #ifdef HAVE_TERMCAP_H |
2248 # include <termcap.h> | |
2249 #endif | |
1621 | 2250 #ifdef HAVE_STRING_H |
2251 # include <string.h> | |
2252 #endif | |
2253 #if STDC_HEADERS | |
2254 # include <stdlib.h> | |
2255 # include <stddef.h> | |
2256 #endif | |
7 | 2257 main() |
1621 | 2258 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } |
2259 ]],[ | |
2260 vim_cv_terminfo=no | |
2261 ],[ | |
2262 vim_cv_terminfo=yes | |
2263 ],[ | |
2264 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_terminfo') | |
2265 ]) | |
2266 ]) | |
2267 | |
2268 if test "x$vim_cv_terminfo" = "xyes" ; then | |
2269 AC_DEFINE(TERMINFO) | |
2270 fi | |
7 | 2271 |
2272 if test "x$olibs" != "x$LIBS"; then | |
1621 | 2273 AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], |
2274 [ | |
2275 AC_RUN_IFELSE([[ | |
2276 #include "confdefs.h" | |
7 | 2277 #ifdef HAVE_TERMCAP_H |
2278 # include <termcap.h> | |
2279 #endif | |
1621 | 2280 #if STDC_HEADERS |
2281 # include <stdlib.h> | |
2282 # include <stddef.h> | |
2283 #endif | |
7 | 2284 main() |
1621 | 2285 {char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } |
2286 ]],[ | |
2287 vim_cv_tgent=zero | |
2288 ],[ | |
2289 vim_cv_tgent=non-zero | |
2290 ],[ | |
2291 AC_MSG_ERROR(failed to compile test program.) | |
2292 ]) | |
2293 ]) | |
2294 | |
2295 if test "x$vim_cv_tgent" = "xzero" ; then | |
2296 AC_DEFINE(TGETENT_ZERO_ERR, 0) | |
2297 fi | |
7 | 2298 fi |
2299 | |
2300 AC_MSG_CHECKING(whether termcap.h contains ospeed) | |
2301 AC_TRY_LINK([ | |
2302 #ifdef HAVE_TERMCAP_H | |
2303 # include <termcap.h> | |
2304 #endif | |
2305 ], [ospeed = 20000], | |
2306 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OSPEED), | |
2307 [AC_MSG_RESULT(no) | |
2308 AC_MSG_CHECKING(whether ospeed can be extern) | |
2309 AC_TRY_LINK([ | |
2310 #ifdef HAVE_TERMCAP_H | |
2311 # include <termcap.h> | |
2312 #endif | |
2313 extern short ospeed; | |
2314 ], [ospeed = 20000], | |
2315 AC_MSG_RESULT(yes); AC_DEFINE(OSPEED_EXTERN), | |
2316 AC_MSG_RESULT(no))] | |
2317 ) | |
2318 | |
2319 AC_MSG_CHECKING([whether termcap.h contains UP, BC and PC]) | |
2320 AC_TRY_LINK([ | |
2321 #ifdef HAVE_TERMCAP_H | |
2322 # include <termcap.h> | |
2323 #endif | |
2324 ], [if (UP == 0 && BC == 0) PC = 1], | |
2325 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UP_BC_PC), | |
2326 [AC_MSG_RESULT(no) | |
2327 AC_MSG_CHECKING([whether UP, BC and PC can be extern]) | |
2328 AC_TRY_LINK([ | |
2329 #ifdef HAVE_TERMCAP_H | |
2330 # include <termcap.h> | |
2331 #endif | |
2332 extern char *UP, *BC, PC; | |
2333 ], [if (UP == 0 && BC == 0) PC = 1], | |
2334 AC_MSG_RESULT(yes); AC_DEFINE(UP_BC_PC_EXTERN), | |
2335 AC_MSG_RESULT(no))] | |
2336 ) | |
2337 | |
2338 AC_MSG_CHECKING(whether tputs() uses outfuntype) | |
2339 AC_TRY_COMPILE([ | |
2340 #ifdef HAVE_TERMCAP_H | |
2341 # include <termcap.h> | |
2342 #endif | |
2343 ], [extern int xx(); tputs("test", 1, (outfuntype)xx)], | |
2344 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_OUTFUNTYPE), | |
2345 AC_MSG_RESULT(no)) | |
2346 | |
2347 dnl On some SCO machines sys/select redefines struct timeval | |
2348 AC_MSG_CHECKING([whether sys/select.h and sys/time.h may both be included]) | |
2349 AC_TRY_COMPILE([ | |
2350 #include <sys/types.h> | |
2351 #include <sys/time.h> | |
2352 #include <sys/select.h>], , | |
2353 AC_MSG_RESULT(yes) | |
2354 AC_DEFINE(SYS_SELECT_WITH_SYS_TIME), | |
2355 AC_MSG_RESULT(no)) | |
2356 | |
2357 dnl AC_DECL_SYS_SIGLIST | |
2358 | |
2359 dnl Checks for pty.c (copied from screen) ========================== | |
2360 AC_MSG_CHECKING(for /dev/ptc) | |
2361 if test -r /dev/ptc; then | |
2362 AC_DEFINE(HAVE_DEV_PTC) | |
2363 AC_MSG_RESULT(yes) | |
2364 else | |
2365 AC_MSG_RESULT(no) | |
2366 fi | |
2367 | |
2368 AC_MSG_CHECKING(for SVR4 ptys) | |
2369 if test -c /dev/ptmx ; then | |
2370 AC_TRY_LINK([], [ptsname(0);grantpt(0);unlockpt(0);], | |
2371 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS), | |
2372 AC_MSG_RESULT(no)) | |
2373 else | |
2374 AC_MSG_RESULT(no) | |
2375 fi | |
2376 | |
2377 AC_MSG_CHECKING(for ptyranges) | |
2378 if test -d /dev/ptym ; then | |
2379 pdir='/dev/ptym' | |
2380 else | |
2381 pdir='/dev' | |
2382 fi | |
2383 dnl SCO uses ptyp%d | |
2384 AC_EGREP_CPP(yes, | |
2385 [#ifdef M_UNIX | |
2386 yes; | |
2387 #endif | |
2388 ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`) | |
2389 dnl if test -c /dev/ptyp19; then | |
2390 dnl ptys=`echo /dev/ptyp??` | |
2391 dnl else | |
2392 dnl ptys=`echo $pdir/pty??` | |
2393 dnl fi | |
2394 if test "$ptys" != "$pdir/pty??" ; then | |
2395 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` | |
2396 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` | |
2397 AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") | |
2398 AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") | |
2399 AC_MSG_RESULT([$p0 / $p1]) | |
2400 else | |
2401 AC_MSG_RESULT([don't know]) | |
2402 fi | |
2403 | |
2404 dnl **** pty mode/group handling **** | |
2405 dnl | |
2406 dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222 | |
2407 rm -f conftest_grp | |
1621 | 2408 AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group], |
2409 [ | |
2410 AC_RUN_IFELSE([[ | |
2411 #include "confdefs.h" | |
7 | 2412 #include <sys/types.h> |
1621 | 2413 #if STDC_HEADERS |
2414 # include <stdlib.h> | |
2415 # include <stddef.h> | |
2416 #endif | |
2417 #ifdef HAVE_UNISTD_H | |
2418 #include <unistd.h> | |
2419 #endif | |
7 | 2420 #include <sys/stat.h> |
2421 #include <stdio.h> | |
2422 main() | |
2423 { | |
2424 struct stat sb; | |
2425 char *x,*ttyname(); | |
2426 int om, m; | |
2427 FILE *fp; | |
2428 | |
2429 if (!(x = ttyname(0))) exit(1); | |
2430 if (stat(x, &sb)) exit(1); | |
2431 om = sb.st_mode; | |
2432 if (om & 002) exit(0); | |
2433 m = system("mesg y"); | |
2434 if (m == -1 || m == 127) exit(1); | |
2435 if (stat(x, &sb)) exit(1); | |
2436 m = sb.st_mode; | |
2437 if (chmod(x, om)) exit(1); | |
2438 if (m & 002) exit(0); | |
2439 if (sb.st_gid == getgid()) exit(1); | |
2440 if (!(fp=fopen("conftest_grp", "w"))) | |
2441 exit(1); | |
2442 fprintf(fp, "%d\n", sb.st_gid); | |
2443 fclose(fp); | |
2444 exit(0); | |
2445 } | |
1621 | 2446 ]],[ |
2447 if test -f conftest_grp; then | |
2448 vim_cv_tty_group=`cat conftest_grp` | |
2449 if test "x$vim_cv_tty_mode" = "x" ; then | |
2450 vim_cv_tty_mode=0620 | |
2451 fi | |
2452 AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group]) | |
2453 else | |
2454 vim_cv_tty_group=world | |
2018 | 2455 AC_MSG_RESULT([ptys are world accessible]) |
1621 | 2456 fi |
2457 ],[ | |
2458 vim_cv_tty_group=world | |
2018 | 2459 AC_MSG_RESULT([can't determine - assume ptys are world accessible]) |
1621 | 2460 ],[ |
2461 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode') | |
2462 ]) | |
2463 ]) | |
7 | 2464 rm -f conftest_grp |
2465 | |
1621 | 2466 if test "x$vim_cv_tty_group" != "xworld" ; then |
2467 AC_DEFINE_UNQUOTED(PTYGROUP,$vim_cv_tty_group) | |
2468 if test "x$vim_cv_tty_mode" = "x" ; then | |
2469 AC_MSG_ERROR([It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (propably 0620)]) | |
2470 else | |
2471 AC_DEFINE(PTYMODE, 0620) | |
2472 fi | |
2473 fi | |
2474 | |
7 | 2475 dnl Checks for library functions. =================================== |
2476 | |
2477 AC_TYPE_SIGNAL | |
2478 | |
2479 dnl find out what to use at the end of a signal function | |
2480 if test $ac_cv_type_signal = void; then | |
2481 AC_DEFINE(SIGRETURN, [return]) | |
2482 else | |
2483 AC_DEFINE(SIGRETURN, [return 0]) | |
2484 fi | |
2485 | |
2486 dnl check if struct sigcontext is defined (used for SGI only) | |
2487 AC_MSG_CHECKING(for struct sigcontext) | |
2488 AC_TRY_COMPILE([ | |
2489 #include <signal.h> | |
2490 test_sig() | |
2491 { | |
2492 struct sigcontext *scont; | |
2493 scont = (struct sigcontext *)0; | |
2494 return 1; | |
2495 } ], , | |
2496 AC_MSG_RESULT(yes) | |
2497 AC_DEFINE(HAVE_SIGCONTEXT), | |
2498 AC_MSG_RESULT(no)) | |
2499 | |
2500 dnl tricky stuff: try to find out if getcwd() is implemented with | |
2501 dnl system("sh -c pwd") | |
1621 | 2502 AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken], |
2503 [ | |
2504 AC_RUN_IFELSE([[ | |
2505 #include "confdefs.h" | |
2506 #ifdef HAVE_UNISTD_H | |
2507 #include <unistd.h> | |
2508 #endif | |
7 | 2509 char *dagger[] = { "IFS=pwd", 0 }; |
2510 main() | |
2511 { | |
2512 char buffer[500]; | |
2513 extern char **environ; | |
2514 environ = dagger; | |
2515 return getcwd(buffer, 500) ? 0 : 1; | |
1621 | 2516 } |
2517 ]],[ | |
2518 vim_cv_getcwd_broken=no | |
2519 ],[ | |
2520 vim_cv_getcwd_broken=yes | |
2521 ],[ | |
2522 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_getcwd_broken') | |
2523 ]) | |
2524 ]) | |
2525 | |
2526 if test "x$vim_cv_getcwd_broken" = "xyes" ; then | |
2527 AC_DEFINE(BAD_GETCWD) | |
2528 fi | |
7 | 2529 |
2087
3112fcc89238
updated for version 7.2.371
Bram Moolenaar <bram@zimbu.org>
parents:
2077
diff
changeset
|
2530 dnl Check for functions in one big call, to reduce the size of configure. |
3112fcc89238
updated for version 7.2.371
Bram Moolenaar <bram@zimbu.org>
parents:
2077
diff
changeset
|
2531 dnl Can only be used for functions that do not require any include. |
3112fcc89238
updated for version 7.2.371
Bram Moolenaar <bram@zimbu.org>
parents:
2077
diff
changeset
|
2532 AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \ |
7 | 2533 getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ |
1997 | 2534 memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ |
7 | 2535 setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ |
273 | 2536 sigvec strcasecmp strerror strftime stricmp strncasecmp \ |
258 | 2537 strnicmp strpbrk strtol tgetent towlower towupper iswupper \ |
2538 usleep utime utimes) | |
2087
3112fcc89238
updated for version 7.2.371
Bram Moolenaar <bram@zimbu.org>
parents:
2077
diff
changeset
|
2539 AC_FUNC_FSEEKO |
7 | 2540 |
2131
8ef9da918a98
updated for version 7.2.413
Bram Moolenaar <bram@zimbu.org>
parents:
2110
diff
changeset
|
2541 dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when |
8ef9da918a98
updated for version 7.2.413
Bram Moolenaar <bram@zimbu.org>
parents:
2110
diff
changeset
|
2542 dnl appropriate, so that off_t is 64 bits when needed. |
8ef9da918a98
updated for version 7.2.413
Bram Moolenaar <bram@zimbu.org>
parents:
2110
diff
changeset
|
2543 AC_SYS_LARGEFILE |
8ef9da918a98
updated for version 7.2.413
Bram Moolenaar <bram@zimbu.org>
parents:
2110
diff
changeset
|
2544 |
7 | 2545 dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible |
2546 AC_MSG_CHECKING(for st_blksize) | |
2547 AC_TRY_COMPILE( | |
2548 [#include <sys/types.h> | |
2549 #include <sys/stat.h>], | |
2550 [ struct stat st; | |
2551 int n; | |
2552 | |
2553 stat("/", &st); | |
2554 n = (int)st.st_blksize;], | |
2555 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ST_BLKSIZE), | |
2556 AC_MSG_RESULT(no)) | |
2557 | |
1621 | 2558 AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], |
2559 [ | |
2560 AC_RUN_IFELSE([[ | |
2561 #include "confdefs.h" | |
2562 #if STDC_HEADERS | |
2563 # include <stdlib.h> | |
2564 # include <stddef.h> | |
2565 #endif | |
2566 #include <sys/types.h> | |
7 | 2567 #include <sys/stat.h> |
1621 | 2568 main() {struct stat st; exit(stat("configure/", &st) != 0); } |
2569 ]],[ | |
2570 vim_cv_stat_ignores_slash=yes | |
2571 ],[ | |
2572 vim_cv_stat_ignores_slash=no | |
2573 ],[ | |
2574 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_stat_ignores_slash') | |
2575 ]) | |
2576 ]) | |
7 | 2577 |
1621 | 2578 if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then |
2579 AC_DEFINE(STAT_IGNORES_SLASH) | |
2580 fi | |
2581 | |
7 | 2582 dnl Link with iconv for charset translation, if not found without library. |
2583 dnl check for iconv() requires including iconv.h | |
2584 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it | |
2585 dnl has been installed. | |
2586 AC_MSG_CHECKING(for iconv_open()) | |
2587 save_LIBS="$LIBS" | |
2588 LIBS="$LIBS -liconv" | |
2589 AC_TRY_LINK([ | |
2590 #ifdef HAVE_ICONV_H | |
2591 # include <iconv.h> | |
2592 #endif | |
2593 ], [iconv_open("fr", "to");], | |
2594 AC_MSG_RESULT(yes; with -liconv); AC_DEFINE(HAVE_ICONV), | |
2595 LIBS="$save_LIBS" | |
2596 AC_TRY_LINK([ | |
2597 #ifdef HAVE_ICONV_H | |
2598 # include <iconv.h> | |
2599 #endif | |
2600 ], [iconv_open("fr", "to");], | |
2601 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ICONV), | |
2602 AC_MSG_RESULT(no))) | |
2603 | |
2604 | |
2605 AC_MSG_CHECKING(for nl_langinfo(CODESET)) | |
2606 AC_TRY_LINK([ | |
2607 #ifdef HAVE_LANGINFO_H | |
2608 # include <langinfo.h> | |
2609 #endif | |
2610 ], [char *cs = nl_langinfo(CODESET);], | |
2611 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NL_LANGINFO_CODESET), | |
2612 AC_MSG_RESULT(no)) | |
2613 | |
1621 | 2614 dnl Need various functions for floating point support. Only enable |
2615 dnl floating point when they are all present. | |
2616 AC_CHECK_LIB(m, strtod) | |
2617 AC_MSG_CHECKING([for strtod() and other floating point functions]) | |
2618 AC_TRY_LINK([ | |
2619 #ifdef HAVE_MATH_H | |
2620 # include <math.h> | |
2621 #endif | |
2622 #if STDC_HEADERS | |
2623 # include <stdlib.h> | |
2624 # include <stddef.h> | |
2625 #endif | |
2626 ], [char *s; double d; | |
2627 d = strtod("1.1", &s); | |
2628 d = fabs(1.11); | |
2629 d = ceil(1.11); | |
2630 d = floor(1.11); | |
2631 d = log10(1.11); | |
2632 d = pow(1.11, 2.22); | |
2633 d = sqrt(1.11); | |
2634 d = sin(1.11); | |
2635 d = cos(1.11); | |
2636 d = atan(1.11); | |
2637 ], | |
2638 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS), | |
2639 AC_MSG_RESULT(no)) | |
2640 | |
7 | 2641 dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI |
2642 dnl when -lacl works, also try to use -lattr (required for Debian). | |
2643 AC_MSG_CHECKING(--disable-acl argument) | |
2644 AC_ARG_ENABLE(acl, | |
2645 [ --disable-acl Don't check for ACL support.], | |
2646 , [enable_acl="yes"]) | |
2647 if test "$enable_acl" = "yes"; then | |
2648 AC_MSG_RESULT(no) | |
2649 AC_CHECK_LIB(posix1e, acl_get_file, [LIBS="$LIBS -lposix1e"], | |
2650 AC_CHECK_LIB(acl, acl_get_file, [LIBS="$LIBS -lacl" | |
2651 AC_CHECK_LIB(attr, fgetxattr, LIBS="$LIBS -lattr",,)],,),) | |
2652 | |
2653 AC_MSG_CHECKING(for POSIX ACL support) | |
2654 AC_TRY_LINK([ | |
2655 #include <sys/types.h> | |
2656 #ifdef HAVE_SYS_ACL_H | |
2657 # include <sys/acl.h> | |
2658 #endif | |
2659 acl_t acl;], [acl = acl_get_file("foo", ACL_TYPE_ACCESS); | |
2660 acl_set_file("foo", ACL_TYPE_ACCESS, acl); | |
2661 acl_free(acl);], | |
2662 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_POSIX_ACL), | |
2663 AC_MSG_RESULT(no)) | |
2664 | |
2665 AC_MSG_CHECKING(for Solaris ACL support) | |
2666 AC_TRY_LINK([ | |
2667 #ifdef HAVE_SYS_ACL_H | |
2668 # include <sys/acl.h> | |
2669 #endif], [acl("foo", GETACLCNT, 0, NULL); | |
2670 ], | |
2671 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOLARIS_ACL), | |
2672 AC_MSG_RESULT(no)) | |
2673 | |
2674 AC_MSG_CHECKING(for AIX ACL support) | |
2675 AC_TRY_LINK([ | |
1621 | 2676 #if STDC_HEADERS |
2677 # include <stdlib.h> | |
2678 # include <stddef.h> | |
2679 #endif | |
7 | 2680 #ifdef HAVE_SYS_ACL_H |
2681 # include <sys/acl.h> | |
2682 #endif | |
2683 #ifdef HAVE_SYS_ACCESS_H | |
2684 # include <sys/access.h> | |
2685 #endif | |
2686 #define _ALL_SOURCE | |
2687 | |
2688 #include <sys/stat.h> | |
2689 | |
2690 int aclsize; | |
2691 struct acl *aclent;], [aclsize = sizeof(struct acl); | |
2692 aclent = (void *)malloc(aclsize); | |
2693 statacl("foo", STX_NORMAL, aclent, aclsize); | |
2694 ], | |
2695 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_AIX_ACL), | |
2696 AC_MSG_RESULT(no)) | |
2697 else | |
2698 AC_MSG_RESULT(yes) | |
2699 fi | |
2700 | |
2701 AC_MSG_CHECKING(--disable-gpm argument) | |
2702 AC_ARG_ENABLE(gpm, | |
2703 [ --disable-gpm Don't use gpm (Linux mouse daemon).], , | |
2704 [enable_gpm="yes"]) | |
2705 | |
2706 if test "$enable_gpm" = "yes"; then | |
2707 AC_MSG_RESULT(no) | |
2708 dnl Checking if gpm support can be compiled | |
2709 AC_CACHE_CHECK([for gpm], vi_cv_have_gpm, | |
2710 [olibs="$LIBS" ; LIBS="-lgpm"] | |
2711 AC_TRY_LINK( | |
2712 [#include <gpm.h> | |
2713 #include <linux/keyboard.h>], | |
2714 [Gpm_GetLibVersion(NULL);], | |
2715 dnl Configure defines HAVE_GPM, if it is defined feature.h defines | |
2716 dnl FEAT_MOUSE_GPM if mouse support is included | |
2717 [vi_cv_have_gpm=yes], | |
2718 [vi_cv_have_gpm=no]) | |
2719 [LIBS="$olibs"] | |
2720 ) | |
2721 if test $vi_cv_have_gpm = yes; then | |
2722 LIBS="$LIBS -lgpm" | |
2723 AC_DEFINE(HAVE_GPM) | |
2724 fi | |
2725 else | |
2726 AC_MSG_RESULT(yes) | |
2727 fi | |
2728 | |
1621 | 2729 AC_MSG_CHECKING(--disable-sysmouse argument) |
2730 AC_ARG_ENABLE(sysmouse, | |
2731 [ --disable-sysmouse Don't use sysmouse (mouse in *BSD console).], , | |
2732 [enable_sysmouse="yes"]) | |
2733 | |
2734 if test "$enable_sysmouse" = "yes"; then | |
2735 AC_MSG_RESULT(no) | |
2736 dnl Checking if sysmouse support can be compiled | |
2737 dnl Configure defines HAVE_SYSMOUSE, if it is defined feature.h | |
2738 dnl defines FEAT_SYSMOUSE if mouse support is included | |
2739 AC_CACHE_CHECK([for sysmouse], vi_cv_have_sysmouse, | |
2740 AC_TRY_LINK( | |
2741 [#include <sys/consio.h> | |
2742 #include <signal.h> | |
2743 #include <sys/fbio.h>], | |
2744 [struct mouse_info mouse; | |
2745 mouse.operation = MOUSE_MODE; | |
2746 mouse.operation = MOUSE_SHOW; | |
2747 mouse.u.mode.mode = 0; | |
2748 mouse.u.mode.signal = SIGUSR2;], | |
2749 [vi_cv_have_sysmouse=yes], | |
2750 [vi_cv_have_sysmouse=no]) | |
2751 ) | |
2752 if test $vi_cv_have_sysmouse = yes; then | |
2753 AC_DEFINE(HAVE_SYSMOUSE) | |
2754 fi | |
2755 else | |
2756 AC_MSG_RESULT(yes) | |
2757 fi | |
2758 | |
2003 | 2759 dnl make sure the FD_CLOEXEC flag for fcntl()'s F_SETFD command is known |
2760 AC_MSG_CHECKING(for FD_CLOEXEC) | |
2761 AC_TRY_COMPILE( | |
2762 [#if HAVE_FCNTL_H | |
2763 # include <fcntl.h> | |
2764 #endif], | |
2765 [ int flag = FD_CLOEXEC;], | |
2766 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FD_CLOEXEC), | |
2767 AC_MSG_RESULT(not usable)) | |
2768 | |
7 | 2769 dnl rename needs to be checked separately to work on Nextstep with cc |
2770 AC_MSG_CHECKING(for rename) | |
2771 AC_TRY_LINK([#include <stdio.h>], [rename("this", "that")], | |
2772 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), | |
2773 AC_MSG_RESULT(no)) | |
2774 | |
2775 dnl sysctl() may exist but not the arguments we use | |
2776 AC_MSG_CHECKING(for sysctl) | |
2777 AC_TRY_COMPILE( | |
2778 [#include <sys/types.h> | |
2779 #include <sys/sysctl.h>], | |
2780 [ int mib[2], r; | |
2781 size_t len; | |
2782 | |
2783 mib[0] = CTL_HW; | |
2784 mib[1] = HW_USERMEM; | |
2785 len = sizeof(r); | |
2786 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0); | |
2787 ], | |
2788 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCTL), | |
2789 AC_MSG_RESULT(not usable)) | |
2790 | |
2791 dnl sysinfo() may exist but not be Linux compatible | |
2792 AC_MSG_CHECKING(for sysinfo) | |
2793 AC_TRY_COMPILE( | |
2794 [#include <sys/types.h> | |
2795 #include <sys/sysinfo.h>], | |
2796 [ struct sysinfo sinfo; | |
2797 int t; | |
2798 | |
2799 (void)sysinfo(&sinfo); | |
2800 t = sinfo.totalram; | |
2801 ], | |
2802 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO), | |
2803 AC_MSG_RESULT(not usable)) | |
2804 | |
1110 | 2805 dnl struct sysinfo may have the mem_unit field or not |
2806 AC_MSG_CHECKING(for sysinfo.mem_unit) | |
2807 AC_TRY_COMPILE( | |
2808 [#include <sys/types.h> | |
2809 #include <sys/sysinfo.h>], | |
2810 [ struct sysinfo sinfo; | |
2811 sinfo.mem_unit = 1; | |
2812 ], | |
2813 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), | |
2814 AC_MSG_RESULT(no)) | |
2815 | |
7 | 2816 dnl sysconf() may exist but not support what we want to use |
2817 AC_MSG_CHECKING(for sysconf) | |
2818 AC_TRY_COMPILE( | |
2819 [#include <unistd.h>], | |
2820 [ (void)sysconf(_SC_PAGESIZE); | |
2821 (void)sysconf(_SC_PHYS_PAGES); | |
2822 ], | |
2823 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF), | |
2824 AC_MSG_RESULT(not usable)) | |
2825 | |
2241
60da25e3aab7
Correct use of long instead of off_t for file size. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
2826 AC_CHECK_SIZEOF([int]) |
60da25e3aab7
Correct use of long instead of off_t for file size. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
2827 AC_CHECK_SIZEOF([long]) |
60da25e3aab7
Correct use of long instead of off_t for file size. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
2828 AC_CHECK_SIZEOF([time_t]) |
60da25e3aab7
Correct use of long instead of off_t for file size. (James Vega)
Bram Moolenaar <bram@vim.org>
parents:
2232
diff
changeset
|
2829 AC_CHECK_SIZEOF([off_t]) |
2232
2e6906bbc5f4
A few more fixes for undo file. Split test in two parts so that it doesn't
Bram Moolenaar <bram@vim.org>
parents:
2200
diff
changeset
|
2830 |
2199
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2831 dnl Make sure that uint32_t is really 32 bits unsigned. |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2832 AC_MSG_CHECKING([uint32_t is 32 bits]) |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2833 AC_TRY_RUN([ |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2834 #ifdef HAVE_STDINT_H |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2835 # include <stdint.h> |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2836 #endif |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2837 #ifdef HAVE_INTTYPES_H |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2838 # include <inttypes.h> |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2839 #endif |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2840 main() { |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2841 uint32_t nr1 = (uint32_t)-1; |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2842 uint32_t nr2 = (uint32_t)0xffffffffUL; |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2843 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2844 exit(0); |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2845 }], |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2846 AC_MSG_RESULT(ok), |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2847 AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]), |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2848 AC_MSG_ERROR([could not compile program using uint32_t.])) |
014a996ac896
Use UINT32_T in the code, define it to uint32_t or unsigned int.
Bram Moolenaar <bram@vim.org>
parents:
2184
diff
changeset
|
2849 |
1621 | 2850 dnl Check for memmove() before bcopy(), makes memmove() be used when both are |
2851 dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5. | |
2852 | |
7 | 2853 [bcopy_test_prog=' |
1621 | 2854 #include "confdefs.h" |
2855 #ifdef HAVE_STRING_H | |
2856 # include <string.h> | |
2857 #endif | |
2858 #if STDC_HEADERS | |
2859 # include <stdlib.h> | |
2860 # include <stddef.h> | |
2861 #endif | |
7 | 2862 main() { |
2863 char buf[10]; | |
2864 strcpy(buf, "abcdefghi"); | |
2865 mch_memmove(buf, buf + 2, 3); | |
2866 if (strncmp(buf, "ababcf", 6)) | |
2867 exit(1); | |
2868 strcpy(buf, "abcdefghi"); | |
2869 mch_memmove(buf + 2, buf, 3); | |
2870 if (strncmp(buf, "cdedef", 6)) | |
2871 exit(1); | |
2872 exit(0); /* libc version works properly. */ | |
2873 }'] | |
2874 | |
1621 | 2875 AC_CACHE_CHECK([whether memmove handles overlaps],[vim_cv_memmove_handles_overlap], |
2876 [ | |
2877 AC_RUN_IFELSE([[#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog]], | |
2878 [ | |
2879 vim_cv_memmove_handles_overlap=yes | |
2880 ],[ | |
2881 vim_cv_memmove_handles_overlap=no | |
2882 ],[ | |
2883 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_memmove_handles_overlap') | |
2884 ]) | |
2885 ]) | |
7 | 2886 |
1621 | 2887 if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then |
2888 AC_DEFINE(USEMEMMOVE) | |
2889 else | |
2890 AC_CACHE_CHECK([whether bcopy handles overlaps],[vim_cv_bcopy_handles_overlap], | |
2891 [ | |
2892 AC_RUN_IFELSE([[#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog]], | |
2893 [ | |
2894 vim_cv_bcopy_handles_overlap=yes | |
2895 ],[ | |
2896 vim_cv_bcopy_handles_overlap=no | |
2897 ],[ | |
2898 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_bcopy_handles_overlap') | |
2899 ]) | |
2900 ]) | |
2901 | |
2902 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then | |
2903 AC_DEFINE(USEBCOPY) | |
2904 else | |
2905 AC_CACHE_CHECK([whether memcpy handles overlaps],[vim_cv_memcpy_handles_overlap], | |
2906 [ | |
2907 AC_RUN_IFELSE([[#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog]], | |
2908 [ | |
2909 vim_cv_memcpy_handles_overlap=yes | |
2910 ],[ | |
2911 vim_cv_memcpy_handles_overlap=no | |
2912 ],[ | |
2913 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_memcpy_handles_overlap') | |
2914 ]) | |
2915 ]) | |
2916 | |
2917 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then | |
2918 AC_DEFINE(USEMEMCPY) | |
2919 fi | |
2920 fi | |
2921 fi | |
2922 | |
7 | 2923 |
2924 dnl Check for multibyte locale functions | |
2925 dnl Find out if _Xsetlocale() is supported by libX11. | |
2926 dnl Check if X_LOCALE should be defined. | |
2927 | |
2928 if test "$enable_multibyte" = "yes"; then | |
2929 cflags_save=$CFLAGS | |
2930 ldflags_save=$LDFLAGS | |
1861 | 2931 if test "x$x_includes" != "xNONE" ; then |
7 | 2932 CFLAGS="$CFLAGS -I$x_includes" |
2933 LDFLAGS="$X_LIBS $LDFLAGS -lX11" | |
2934 AC_MSG_CHECKING(whether X_LOCALE needed) | |
2935 AC_TRY_COMPILE([#include <X11/Xlocale.h>],, | |
2936 AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes) | |
2937 AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)), | |
2938 AC_MSG_RESULT(no)) | |
2939 fi | |
2940 CFLAGS=$cflags_save | |
2941 LDFLAGS=$ldflags_save | |
2942 fi | |
2943 | |
2944 dnl Link with xpg4, it is said to make Korean locale working | |
2945 AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) | |
2946 | |
1871 | 2947 dnl Check how we can run ctags. Default to "ctags" when nothing works. |
7 | 2948 dnl --version for Exuberant ctags (preferred) |
834 | 2949 dnl Add --fields=+S to get function signatures for omni completion. |
7 | 2950 dnl -t for typedefs (many ctags have this) |
2951 dnl -s for static functions (Elvis ctags only?) | |
2952 dnl -v for variables. Dangerous, most ctags take this for 'vgrind style'. | |
2953 dnl -i+m to test for older Exuberant ctags | |
2954 AC_MSG_CHECKING(how to create tags) | |
2955 test -f tags && mv tags tags.save | |
2956 if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then | |
834 | 2957 TAGPRG="ctags -I INIT+ --fields=+S" |
7 | 2958 else |
1871 | 2959 TAGPRG="ctags" |
7 | 2960 (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" |
2961 (eval etags -c /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags -c" | |
2962 (eval ctags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags" | |
2963 (eval ctags -t /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -t" | |
2964 (eval ctags -ts /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -ts" | |
2965 (eval ctags -tvs /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -tvs" | |
2966 (eval ctags -i+m /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="ctags -i+m" | |
2967 fi | |
2968 test -f tags.save && mv tags.save tags | |
2969 AC_MSG_RESULT($TAGPRG) AC_SUBST(TAGPRG) | |
2970 | |
2971 dnl Check how we can run man with a section number | |
2972 AC_MSG_CHECKING(how to run man with a section nr) | |
2973 MANDEF="man" | |
1531 | 2974 (eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&AC_FD_CC && MANDEF="man -s" |
7 | 2975 AC_MSG_RESULT($MANDEF) |
2976 if test "$MANDEF" = "man -s"; then | |
2977 AC_DEFINE(USEMAN_S) | |
2978 fi | |
2979 | |
2980 dnl Check if gettext() is working and if it needs -lintl | |
2981 AC_MSG_CHECKING(--disable-nls argument) | |
2982 AC_ARG_ENABLE(nls, | |
2983 [ --disable-nls Don't support NLS (gettext()).], , | |
2984 [enable_nls="yes"]) | |
2985 | |
2986 if test "$enable_nls" = "yes"; then | |
2987 AC_MSG_RESULT(no) | |
282 | 2988 |
2989 INSTALL_LANGS=install-languages | |
2990 AC_SUBST(INSTALL_LANGS) | |
2991 INSTALL_TOOL_LANGS=install-tool-languages | |
2992 AC_SUBST(INSTALL_TOOL_LANGS) | |
2993 | |
7 | 2994 AC_CHECK_PROG(MSGFMT, msgfmt, msgfmt, ) |
2995 AC_MSG_CHECKING([for NLS]) | |
2996 if test -f po/Makefile; then | |
2997 have_gettext="no" | |
2998 if test -n "$MSGFMT"; then | |
2999 AC_TRY_LINK( | |
3000 [#include <libintl.h>], | |
3001 [gettext("Test");], | |
3002 AC_MSG_RESULT([gettext() works]); have_gettext="yes", | |
3003 olibs=$LIBS | |
3004 LIBS="$LIBS -lintl" | |
3005 AC_TRY_LINK( | |
3006 [#include <libintl.h>], | |
3007 [gettext("Test");], | |
3008 AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes", | |
3009 AC_MSG_RESULT([gettext() doesn't work]); | |
3010 LIBS=$olibs)) | |
3011 else | |
3012 AC_MSG_RESULT([msgfmt not found - disabled]); | |
3013 fi | |
3014 if test $have_gettext = "yes"; then | |
3015 AC_DEFINE(HAVE_GETTEXT) | |
3016 MAKEMO=yes | |
3017 AC_SUBST(MAKEMO) | |
3018 dnl this was added in GNU gettext 0.10.36 | |
3019 AC_CHECK_FUNCS(bind_textdomain_codeset) | |
3020 dnl _nl_msg_cat_cntr is required for GNU gettext | |
3021 AC_MSG_CHECKING([for _nl_msg_cat_cntr]) | |
3022 AC_TRY_LINK( | |
3023 [#include <libintl.h> | |
3024 extern int _nl_msg_cat_cntr;], | |
3025 [++_nl_msg_cat_cntr;], | |
3026 AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_NL_MSG_CAT_CNTR), | |
3027 AC_MSG_RESULT([no])) | |
3028 fi | |
3029 else | |
3030 AC_MSG_RESULT([no "po/Makefile" - disabled]); | |
3031 fi | |
3032 else | |
3033 AC_MSG_RESULT(yes) | |
3034 fi | |
3035 | |
3036 dnl Check for dynamic linking loader | |
3037 AC_CHECK_HEADER(dlfcn.h, DLL=dlfcn.h, [AC_CHECK_HEADER(dl.h, DLL=dl.h)]) | |
3038 if test x${DLL} = xdlfcn.h; then | |
3039 AC_DEFINE(HAVE_DLFCN_H, 1, [ Define if we have dlfcn.h. ]) | |
3040 AC_MSG_CHECKING([for dlopen()]) | |
3041 AC_TRY_LINK(,[ | |
3042 extern void* dlopen(); | |
3043 dlopen(); | |
3044 ], | |
3045 AC_MSG_RESULT(yes); | |
3046 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), | |
3047 AC_MSG_RESULT(no); | |
3048 AC_MSG_CHECKING([for dlopen() in -ldl]) | |
3049 olibs=$LIBS | |
3050 LIBS="$LIBS -ldl" | |
3051 AC_TRY_LINK(,[ | |
3052 extern void* dlopen(); | |
3053 dlopen(); | |
3054 ], | |
3055 AC_MSG_RESULT(yes); | |
3056 AC_DEFINE(HAVE_DLOPEN, 1, [ Define if we have dlopen() ]), | |
3057 AC_MSG_RESULT(no); | |
3058 LIBS=$olibs)) | |
3059 dnl ReliantUNIX has dlopen() in libc but everything else in libdl | |
3060 dnl ick :-) | |
3061 AC_MSG_CHECKING([for dlsym()]) | |
3062 AC_TRY_LINK(,[ | |
3063 extern void* dlsym(); | |
3064 dlsym(); | |
3065 ], | |
3066 AC_MSG_RESULT(yes); | |
3067 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), | |
3068 AC_MSG_RESULT(no); | |
3069 AC_MSG_CHECKING([for dlsym() in -ldl]) | |
3070 olibs=$LIBS | |
3071 LIBS="$LIBS -ldl" | |
3072 AC_TRY_LINK(,[ | |
3073 extern void* dlsym(); | |
3074 dlsym(); | |
3075 ], | |
3076 AC_MSG_RESULT(yes); | |
3077 AC_DEFINE(HAVE_DLSYM, 1, [ Define if we have dlsym() ]), | |
3078 AC_MSG_RESULT(no); | |
3079 LIBS=$olibs)) | |
3080 elif test x${DLL} = xdl.h; then | |
3081 AC_DEFINE(HAVE_DL_H, 1, [ Define if we have dl.h. ]) | |
3082 AC_MSG_CHECKING([for shl_load()]) | |
3083 AC_TRY_LINK(,[ | |
3084 extern void* shl_load(); | |
3085 shl_load(); | |
3086 ], | |
3087 AC_MSG_RESULT(yes); | |
3088 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), | |
3089 AC_MSG_RESULT(no); | |
3090 AC_MSG_CHECKING([for shl_load() in -ldld]) | |
3091 olibs=$LIBS | |
3092 LIBS="$LIBS -ldld" | |
3093 AC_TRY_LINK(,[ | |
3094 extern void* shl_load(); | |
3095 shl_load(); | |
3096 ], | |
3097 AC_MSG_RESULT(yes); | |
3098 AC_DEFINE(HAVE_SHL_LOAD, 1, [ Define if we have shl_load() ]), | |
3099 AC_MSG_RESULT(no); | |
3100 LIBS=$olibs)) | |
3101 fi | |
3102 AC_CHECK_HEADERS(setjmp.h) | |
3103 | |
3104 if test "x$MACOSX" = "xyes" -a -n "$PERL"; then | |
3105 dnl -ldl must come after DynaLoader.a | |
3106 if echo $LIBS | grep -e '-ldl' >/dev/null; then | |
3107 LIBS=`echo $LIBS | sed s/-ldl//` | |
3108 PERL_LIBS="$PERL_LIBS -ldl" | |
3109 fi | |
3110 fi | |
3111 | |
3112 if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \ | |
3113 && test "x$GUITYPE" != "xCARBONGUI"; then | |
3114 AC_MSG_CHECKING(whether we need -framework Carbon) | |
3115 dnl check for MACOSX without Carbon GUI, but with FEAT_MBYTE | |
1011 | 3116 if test "x$enable_multibyte" = "xyes" || test "x$features" = "xbig" \ |
7 | 3117 || test "x$features" = "xhuge"; then |
3118 LIBS="$LIBS -framework Carbon" | |
3119 AC_MSG_RESULT(yes) | |
3120 else | |
3121 AC_MSG_RESULT(no) | |
3122 fi | |
3123 fi | |
697 | 3124 if test "x$MACARCH" = "xboth"; then |
2110
0f552ca271c2
updated for version 7.2.393
Bram Moolenaar <bram@zimbu.org>
parents:
2087
diff
changeset
|
3125 LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" |
697 | 3126 fi |
7 | 3127 |
548 | 3128 dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to |
3129 dnl use "-isystem" instead of "-I" for all non-Vim include dirs. | |
3130 dnl But only when making dependencies, cproto and lint don't take "-isystem". | |
685 | 3131 dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow |
3132 dnl the number before the version number. | |
548 | 3133 DEPEND_CFLAGS_FILTER= |
3134 if test "$GCC" = yes; then | |
1747 | 3135 AC_MSG_CHECKING(for GCC 3 or later) |
804 | 3136 gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'` |
671 | 3137 if test "$gccmajor" -gt "2"; then |
548 | 3138 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" |
1747 | 3139 AC_MSG_RESULT(yes) |
3140 else | |
3141 AC_MSG_RESULT(no) | |
548 | 3142 fi |
1747 | 3143 dnl -D_FORTIFY_SOURCE=2 crashes Vim on strcpy(buf, "000") when buf is |
3144 dnl declared as char x[1] but actually longer. Introduced in gcc 4.0. | |
2019 | 3145 dnl Also remove duplicate _FORTIFY_SOURCE arguments. |
1747 | 3146 AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) |
3147 if test "$gccmajor" -gt "3"; then | |
2019 | 3148 CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/-D_FORTIFY_SOURCE=.//g' -e 's/$/ -D_FORTIFY_SOURCE=1/'` |
1747 | 3149 AC_MSG_RESULT(yes) |
3150 else | |
3151 AC_MSG_RESULT(no) | |
3152 fi | |
557 | 3153 fi |
548 | 3154 AC_SUBST(DEPEND_CFLAGS_FILTER) |
7 | 3155 |
3156 dnl write output files | |
3157 AC_OUTPUT(auto/config.mk:config.mk.in) | |
3158 | |
3159 dnl vim: set sw=2 tw=78 fo+=l: |