annotate configure.in @ 2048:5060d415a85a

clickable menu items (even those introducing submenus) MUST have callbacks I clicked on the "Panel size" item itself instead of any of the options in its submenu, and: Segfault!
author corvid <corvid@lavabit.com>
date Thu, 26 May 2011 02:51:18 +0000
parents 477a93f3ce22
children
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 dnl Process this file with aclocal, autoconf and automake.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2
1951
36e6563b8daa Assorted minor changes (see verbose log)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1918
diff changeset
3 AC_INIT([dillo], [3.0-pre])
1786
dedb666768cf configure.in: move AC_CANONICAL_SYSTEM to fix an autoconf warning.
Jeremy Henty <onepoint@starurchin.org>
parents: 1785
diff changeset
4
1864
ece02d1a09cc configure.in: replace AC_CANONICAL_SYSTEM with AC_CANONICAL_TARGET.
Jeremy Henty <onepoint@starurchin.org>
parents: 1862
diff changeset
5 dnl Detect the canonical target build environment
ece02d1a09cc configure.in: replace AC_CANONICAL_SYSTEM with AC_CANONICAL_TARGET.
Jeremy Henty <onepoint@starurchin.org>
parents: 1862
diff changeset
6 AC_CANONICAL_TARGET
1786
dedb666768cf configure.in: move AC_CANONICAL_SYSTEM to fix an autoconf warning.
Jeremy Henty <onepoint@starurchin.org>
parents: 1785
diff changeset
7
1785
ef68139142bb configure.in: modernize the initialization of autoconf/automake.
Jeremy Henty <onepoint@starurchin.org>
parents: 1775
diff changeset
8 AM_INIT_AUTOMAKE
ef68139142bb configure.in: modernize the initialization of autoconf/automake.
Jeremy Henty <onepoint@starurchin.org>
parents: 1775
diff changeset
9 AC_CONFIG_SRCDIR([src/dillo.cc])
ef68139142bb configure.in: modernize the initialization of autoconf/automake.
Jeremy Henty <onepoint@starurchin.org>
parents: 1775
diff changeset
10 AC_CONFIG_HEADERS([config.h])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
11
1164
8f682d270874 group dillo system config files into a dillo subdir; have Paths use it
corvid <corvid@lavabit.com>
parents: 996
diff changeset
12 sysconfdir=${sysconfdir}/${PACKAGE}
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
14 dnl Options
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
15
300
74108abc6931 - reversed a mistaken patch.
jcid
parents: 299
diff changeset
16 AC_ARG_WITH(jpeg-lib, [ --with-jpeg-lib=DIR Specify where to find libjpeg], LIBJPEG_LIBDIR=$withval)
74108abc6931 - reversed a mistaken patch.
jcid
parents: 299
diff changeset
17 AC_ARG_WITH(jpeg-inc, [ --with-jpeg-inc=DIR Specify where to find libjpeg's headers], LIBJPEG_INCDIR=$withval)
74108abc6931 - reversed a mistaken patch.
jcid
parents: 299
diff changeset
18
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 AC_ARG_ENABLE(efence, [ --enable-efence Try to compile and run with Electric Fence],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20 , enable_efence=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 AC_ARG_ENABLE(gprof, [ --enable-gprof Try to compile and run with profiling enabled],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 , enable_gprof=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 AC_ARG_ENABLE(insure, [ --enable-insure Try to compile and run with Insure++],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24 , enable_insure=no)
427
jcid
parents: 424
diff changeset
25 AC_ARG_ENABLE(ssl, [ --enable-ssl Enable ssl, https (ALPHA CODE)],
424
479f5df04b37 - Switched SSL enabled to configure.in (./configure --enable-ssl)
jcid
parents: 405
diff changeset
26 , enable_ssl=no)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 AC_ARG_ENABLE(ipv6, [ --enable-ipv6 Build with support for IPv6], , )
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28 AC_ARG_ENABLE(cookies,[ --disable-cookies Don't compile support for cookies],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
29 , enable_cookies=yes)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
30 AC_ARG_ENABLE(png, [ --disable-png Disable support for PNG images],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
31 enable_png=$enableval, enable_png=yes)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
32 AC_ARG_ENABLE(jpeg, [ --disable-jpeg Disable support for JPEG images],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33 enable_jpeg=$enableval, enable_jpeg=yes)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
34 AC_ARG_ENABLE(gif, [ --disable-gif Disable support for GIF images],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
35 enable_gif=$enableval, enable_gif=yes)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
36 AC_ARG_ENABLE(threaded-dns,[ --disable-threaded-dns Disable the advantage of a reentrant resolver library],
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
37 enable_threaded_dns=$enableval, enable_threaded_dns=yes)
2019
4f266c0c954b rtfl comment
corvid <corvid@lavabit.com>
parents: 2018
diff changeset
38 AC_ARG_ENABLE(rtfl, [ --enable-rtfl Build with rtfl messages (for debugging rendering)])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
39 AC_PROG_CC
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
40 AC_PROG_CXX
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
41 AC_PROG_RANLIB
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
42 AC_PROG_CPP
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
43
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
44 dnl ----------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
45 dnl Check our char and int types
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
46 dnl ----------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
47 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
48 AC_CHECK_SIZEOF(char)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
49 AC_CHECK_SIZEOF(short)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
50 AC_CHECK_SIZEOF(long)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
51 AC_CHECK_SIZEOF(int)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
52 AC_CHECK_SIZEOF(void *)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
53
1915
9e14c9633f18 configure.in: define the {int,uint}*_t types with AC_TYPE_*.
Jeremy Henty <onepoint@starurchin.org>
parents: 1868
diff changeset
54 AC_TYPE_INT16_T
9e14c9633f18 configure.in: define the {int,uint}*_t types with AC_TYPE_*.
Jeremy Henty <onepoint@starurchin.org>
parents: 1868
diff changeset
55 AC_TYPE_UINT16_T
9e14c9633f18 configure.in: define the {int,uint}*_t types with AC_TYPE_*.
Jeremy Henty <onepoint@starurchin.org>
parents: 1868
diff changeset
56 AC_TYPE_INT32_T
9e14c9633f18 configure.in: define the {int,uint}*_t types with AC_TYPE_*.
Jeremy Henty <onepoint@starurchin.org>
parents: 1868
diff changeset
57 AC_TYPE_UINT32_T
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
58
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
59 dnl --------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
60 dnl Check whether to add /usr/local or not
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
61 dnl (this is somewhat a religious problem)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
62 dnl --------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
63 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
64 if test "`$CPP -v < /dev/null 2>&1 | grep '/usr/local/include' 2>&1`" = ""; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
65 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
66 LDFLAGS="$LDFLAGS -L/usr/local/lib"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
67 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
68
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
69 dnl ------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
70 dnl Check for socket libs (AIX, Solaris)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
71 dnl ------------------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
72 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
73 AC_CHECK_FUNCS(gethostbyname,,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
74 [AC_CHECK_LIB(nsl,gethostbyname,,[AC_CHECK_LIB(socket,gethostbyname)])])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
75 AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
76
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
77 dnl --------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
78 dnl Checks for socklen_t
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
79 dnl --------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
80 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
81 AC_MSG_CHECKING([for socklen_t])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
82 ac_cv_socklen_t=""
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
83 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
84 #include <sys/types.h>
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
85 #include <sys/socket.h>
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
86 ]],[[
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
87 socklen_t a=0;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
88 getsockname(0,(struct sockaddr*)0, &a);
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
89 ]])],
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
90 ac_cv_socklen_t="socklen_t",
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
91 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
92 #include <sys/types.h>
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
93 #include <sys/socket.h>
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
94 ]],[[
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
95 int a=0;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
96 getsockname(0,(struct sockaddr*)0, &a);
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
97 ]])],
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
98 ac_cv_socklen_t="int",
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
99 ac_cv_socklen_t="size_t"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
100 )
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
101 )
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
102 AC_MSG_RESULT($ac_cv_socklen_t)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
103 if test "$ac_cv_socklen_t" != "socklen_t"; then
1227
511017b74e8e Fixed detection of socklen_t for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 1207
diff changeset
104 AC_DEFINE_UNQUOTED([socklen_t], [$ac_cv_socklen_t],
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
105 [Define the real type of socklen_t])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
106 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
107
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
108
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
109 dnl ----------------------
1789
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
110 dnl Test for FLTK 1.3 library
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
111 dnl ----------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
112 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
113 dnl For debugging and to be user friendly
1789
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
114 AC_MSG_CHECKING([FLTK 1.3])
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
115 fltk_version="`fltk-config --version 2>/dev/null`"
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
116 case $fltk_version in
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
117 1.3.*) AC_MSG_RESULT(yes)
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
118 LIBFLTK_CXXFLAGS=`fltk-config --cxxflags`
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
119 LIBFLTK_CFLAGS=`fltk-config --cflags`
1869
ea5ec76bee0a merge in recent changes from main repo
corvid <corvid@lavabit.com>
parents: 1789 1868
diff changeset
120 LIBFLTK_LIBS=`fltk-config --ldflags`;;
1789
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
121 ?*) AC_MSG_RESULT(no)
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
122 AC_ERROR(FLTK 1.3 required; version found: $fltk_version);;
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
123 *) AC_MSG_RESULT(no)
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
124 AC_ERROR(FLTK 1.3 required; fltk-config not found)
a1cd7f0155b6 fltk-config version checking
corvid <corvid@lavabit.com>
parents: 1788
diff changeset
125 esac
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
126
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
127
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
128 dnl ----------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
129 dnl Test for libjpeg
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
130 dnl ----------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
131 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
132 if test "x$enable_jpeg" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
133 AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
134
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
135 if test "x$jpeg_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
136 old_libs="$LIBS"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
137 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, jpeg_ok=yes, jpeg_ok=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
138 LIBS="$old_libs"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
139 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
140
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
141 if test "x$jpeg_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
142 LIBJPEG_LIBS="-ljpeg"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
143 if test -n "$LIBJPEG_LIBDIR"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
144 LIBJPEG_LDFLAGS="-L$LIBJPEG_LIBDIR"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
145 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
146 if test -n "$LIBJPEG_INCDIR"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
147 LIBJPEG_CPPFLAGS="-I$LIBJPEG_INCDIR"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
148 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
149 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
150 AC_MSG_WARN([*** No libjpeg found. Disabling jpeg images.***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
151 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
152 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
153
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
154 if test "x$jpeg_ok" = "xyes"; then
1227
511017b74e8e Fixed detection of socklen_t for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 1207
diff changeset
155 AC_DEFINE([ENABLE_JPEG], [1], [Enable JPEG images])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
156 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
157
211
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
158 dnl -------------
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
159 dnl Test for zlib
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
160 dnl -------------
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
161 dnl
211
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
162 AC_CHECK_HEADER(zlib.h, libz_ok=yes, libz_ok=no)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
163
211
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
164 if test "x$libz_ok" = "xyes"; then
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
165 old_libs="$LIBS"
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
166 AC_CHECK_LIB(z, zlibVersion, libz_ok=yes, libz_ok=no)
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
167 LIBS="$old_libs"
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
168 fi
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
169
211
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
170 if test "x$libz_ok" = xyes; then
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
171 LIBZ_LIBS="-lz"
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
172 else
1865
98ef1fb7f4e8 configure.in: replace obsolete AC_ERROR with AC_MSG_ERROR.
Jeremy Henty <onepoint@starurchin.org>
parents: 1864
diff changeset
173 AC_MSG_ERROR(zlib must be installed!)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
174 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
175
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
176 dnl ---------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
177 dnl Test for libpng
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
178 dnl ---------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
179 dnl
211
b2ff493b447a - Made zlib a configure requirement.
jcid
parents: 209
diff changeset
180 if test "x$enable_png" = "xyes"; then
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
181 AC_MSG_CHECKING([for libpng-config])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
182
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
183 dnl Check if the user hasn't set the variable $PNG_CONFIG
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
184 if test -z "$PNG_CONFIG"; then
1573
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
185 PNG_CONFIG=`which libpng14-config`
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
186 if test -z "$PNG_CONFIG"; then
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
187 PNG_CONFIG=`which libpng12-config`
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
188 fi
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
189 if test -z "$PNG_CONFIG"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
190 PNG_CONFIG=`which libpng-config`
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
191 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
192 if test -z "$PNG_CONFIG"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
193 PNG_CONFIG=`which libpng10-config`
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
194 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
195 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
196
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
197 dnl Check if the libpng-config script was found and is executable
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
198 if test -n "$PNG_CONFIG" && test -x "$PNG_CONFIG"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
199 AC_MSG_RESULT([$PNG_CONFIG])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
200 png_ok="yes"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
201 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
202 AC_MSG_RESULT([missing])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
203 png_ok="no"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
204 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
205
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
206 if test "x$png_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
207 dnl For debugging and to be user friendly
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
208 AC_MSG_CHECKING([for libpng version])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
209 png_version=`$PNG_CONFIG --version`
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
210 case $png_version in
1573
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
211 1.4.*) AC_MSG_RESULT([$png_version (newer version)]) ;;
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
212 1.2.*) AC_MSG_RESULT([$png_version (newer version)]) ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
213 1.0.*) AC_MSG_RESULT([$png_version (older version)]) ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
214 *) AC_MSG_RESULT([ERROR]) ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
215 esac
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
216
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
217 dnl Try to use options that are supported by all libpng-config versions...
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
218 LIBPNG_CFLAGS=`$PNG_CONFIG --cflags`
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
219 LIBPNG_LIBS=`$PNG_CONFIG --ldflags`
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
220 case $png_version in
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
221 1.2.4*) LIBPNG_LIBS="$LIBPNG_LIBS `$PNG_CONFIG --libs`" ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
222 esac
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
223 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
224 dnl Try to find libpng even though libpng-config wasn't found
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
225 AC_CHECK_HEADERS(png.h libpng/png.h, png_ok=yes && break, png_ok=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
226
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
227 if test "x$png_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
228 old_libs="$LIBS"
1573
1d4de024f7cb (cautious version of) fix for configure.in for libpng 1.4 (reported by xentalion)
corvid <corvid@lavabit.com>
parents: 1557
diff changeset
229 AC_CHECK_LIB(png, png_sig_cmp, png_ok=yes, png_ok=no, $LIBZ_LIBS -lm)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
230 LIBS="$old_libs"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
231
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
232 if test "x$png_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
233 LIBPNG_LIBS="-lpng -lm"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
234 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
235 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
236
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
237 if test "x$png_ok" = "xno"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
238 AC_MSG_WARN([*** No libpng found. Disabling PNG images ***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
239 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
240 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
241 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
242
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
243 if test "x$png_ok" = "xyes"; then
1227
511017b74e8e Fixed detection of socklen_t for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 1207
diff changeset
244 AC_DEFINE([ENABLE_PNG], [1], [Enable PNG images])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
245 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
246
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
247 dnl Check if support for GIF images should be compiled in
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
248 if test "x$enable_gif" = "xyes"; then
1227
511017b74e8e Fixed detection of socklen_t for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 1207
diff changeset
249 AC_DEFINE([ENABLE_GIF], [1], [Enable GIF images])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
250 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
251
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
252 dnl --------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
253 dnl Test for support for SSL
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
254 dnl --------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
255 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
256 if test "x$enable_ssl" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
257 AC_CHECK_HEADER(openssl/ssl.h, ssl_ok=yes, ssl_ok=no)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
258
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
259 if test "x$ssl_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
260 old_libs="$LIBS"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
261 AC_CHECK_LIB(ssl, SSL_library_init, ssl_ok=yes, ssl_ok=no, -lcrypto)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
262 LIBS="$old_libs"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
263 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
264
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
265 if test "x$ssl_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
266 LIBSSL_LIBS="-lcrypto -lssl"
424
479f5df04b37 - Switched SSL enabled to configure.in (./configure --enable-ssl)
jcid
parents: 405
diff changeset
267 AC_MSG_WARN([*** Enabling ssl support. THIS IS ALPHA CODE!***])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
268 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
269 AC_MSG_WARN([*** No libssl found. Disabling ssl support.***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
270 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
271 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
272
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
273 if test "x$ssl_ok" = "xyes"; then
1227
511017b74e8e Fixed detection of socklen_t for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 1207
diff changeset
274 AC_DEFINE([ENABLE_SSL], [1], [Enable SSL support])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
275 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
276
108
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
277 dnl --------------------------------------------------------------
106
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
278 dnl Test for iconv functionality in libc or for libiconv usability
108
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
279 dnl --------------------------------------------------------------
106
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
280 AC_CHECK_HEADER(iconv.h, iconv_ok=yes, iconv_ok=no)
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
281 if test "x$iconv_ok" = "xyes"; then
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
282 AC_CHECK_LIB(c, iconv_open, LIBICONV_LIBS="",
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
283 AC_CHECK_LIB(iconv, iconv_open, LIBICONV_LIBS="-liconv", iconv_ok=no))
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
284 fi
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
285 if test "x$iconv_ok" = "xno"; then
108
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
286 dnl Test for OpenBSD
113
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
287 old_libs="$LIBS"
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
288 LIBS="$old_libs -liconv"
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
289 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
290 #include <iconv.h>
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
291 ]],[[
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
292 iconv_open("","");
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
293 ]])],
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
294 iconv_ok=yes,iconv_ok=no)
113
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
295 LIBS="$old_libs"
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
296 if test "x$iconv_ok" = "xyes"; then
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
297 LIBICONV_LIBS="-liconv"
9ca877f93161 - another tweak to iconv detection for OpenBSD.
jcid
parents: 108
diff changeset
298 fi
108
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
299 fi
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
300
9478813e0c85 - Another try at iconv detection for OpenBSD
jcid
parents: 106
diff changeset
301 if test "x$iconv_ok" = "xno"; then
1865
98ef1fb7f4e8 configure.in: replace obsolete AC_ERROR with AC_MSG_ERROR.
Jeremy Henty <onepoint@starurchin.org>
parents: 1864
diff changeset
302 AC_MSG_ERROR(libiconv must be installed!)
106
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
303 fi
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
304
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
305 dnl ----------------------
142
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
306 dnl Check if we need to
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
307 dnl support the old
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
308 dnl iconv interface
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
309 dnl ----------------------
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
310 if test "x$iconv_ok" = "xyes"; then
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
311 old_libs="$LIBS"
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
312 LIBS="$old_libs $LIBICONV_LIBS"
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
313 old_cflags="$CFLAGS"
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
314 CFLAGS="$CFLAGS -Werror"
434
feb2091ff940 ? Trying a new iconv() test in configure.in.
jcid
parents: 430
diff changeset
315 AC_LANG_PUSH([C++])
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
316 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
317 #include <iconv.h>
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
318 ]],[[
1868
3311bde3bae8 configure.in: fix the test code alignment.
Jeremy Henty <onepoint@starurchin.org>
parents: 1867
diff changeset
319 const char *inPtr;
3311bde3bae8 configure.in: fix the test code alignment.
Jeremy Henty <onepoint@starurchin.org>
parents: 1867
diff changeset
320 char *outPtr;
3311bde3bae8 configure.in: fix the test code alignment.
Jeremy Henty <onepoint@starurchin.org>
parents: 1867
diff changeset
321 size_t inLeft = 0, outRoom = 0;
3311bde3bae8 configure.in: fix the test code alignment.
Jeremy Henty <onepoint@starurchin.org>
parents: 1867
diff changeset
322 iconv_t encoder = iconv_open("ASCII", "UTF-8");
3311bde3bae8 configure.in: fix the test code alignment.
Jeremy Henty <onepoint@starurchin.org>
parents: 1867
diff changeset
323 iconv(encoder, &inPtr, &inLeft, &outPtr, &outRoom);
1866
086b5a6137ce configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
Jeremy Henty <onepoint@starurchin.org>
parents: 1865
diff changeset
324 ]])],
142
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
325 iconv_old=yes,iconv_old=no)
434
feb2091ff940 ? Trying a new iconv() test in configure.in.
jcid
parents: 430
diff changeset
326 AC_LANG_POP([C++])
142
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
327 LIBS="$old_libs"
143
b2c94699dd6c - Fixed a typo s/CLFAGS/CFLAGS/g in configure.in
jcid
parents: 142
diff changeset
328 CFLAGS="$old_cflags"
142
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
329
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
330 if test "x$iconv_old" = "xyes"; then
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
331 AC_DEFINE([inbuf_t], [const char], [Use const char pointers for older libiconv])
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
332 else
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
333 AC_DEFINE([inbuf_t], [char], [Use char pointers for newer libiconv])
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
334 fi
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
335 fi
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
336
d87c151837f4 - Added suport for old iconv() (const char** as 2nd arg).
jcid
parents: 113
diff changeset
337 dnl ----------------------
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
338 dnl Test for POSIX threads
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
339 dnl ----------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
340 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
341 if test -z "$LIBPTHREAD_LIBS"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
342 case $target in
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
343 *-*-linux*|*-*-solaris*)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
344 old_libs="$LIBS"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
345 AC_CHECK_LIB(pthread, pthread_create, LIBPTHREAD_LIBS="-lpthread")
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
346 LIBS="$old_libs"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
347 ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
348
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
349 *-*-osf1*)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
350 AC_MSG_CHECKING(whether pthreads work)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
351 LIBPTHREAD_LIBS="-lpthread -lexc -ldb"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
352 AC_MSG_WARN([*** _Untested pthreads_ try setting LIBPTHREAD_LIBS manually if it doesn't work ***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
353 ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
354
1235
81e5a3d2dbf0 Skip pthread detection for minix (configure.in)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
355 *-*-minix*)
81e5a3d2dbf0 Skip pthread detection for minix (configure.in)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
356 AC_MSG_NOTICE([Minix detected, skipping pthread detection])
81e5a3d2dbf0 Skip pthread detection for minix (configure.in)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
357 ;;
81e5a3d2dbf0 Skip pthread detection for minix (configure.in)
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
358
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
359 *)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
360 AC_MSG_CHECKING(whether threads work with -pthread)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
361 LDSAVEFLAGS=$LDFLAGS
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
362 LDFLAGS="$LDFLAGS -pthread"
1867
35094bb928a5 configure.in: replace obsolete AC_TRY_LINK_FUNC with AC_LINK_IFELSE/AC_LANG_CALL.
Jeremy Henty <onepoint@starurchin.org>
parents: 1866
diff changeset
363 AC_LINK_IFELSE([AC_LANG_CALL([],[pthread_create])],
35094bb928a5 configure.in: replace obsolete AC_TRY_LINK_FUNC with AC_LINK_IFELSE/AC_LANG_CALL.
Jeremy Henty <onepoint@starurchin.org>
parents: 1866
diff changeset
364 pthread_ok=yes, pthread_ok=no)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
365 LDFLAGS=$LDSAVEFLAGS
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
366
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
367 if test "x$pthread_ok" = "xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
368 AC_MSG_RESULT(yes)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
369 LIBPTHREAD_LDFLAGS="-pthread"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
370 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
371 AC_MSG_RESULT(no. Now we will try some libraries.)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
372
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
373 AC_SEARCH_LIBS(pthread_create, pthread,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
374 LIBPTHREADS_LIBS="-lpthread",
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
375 AC_SEARCH_LIBS(pthread_create, pthreads,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
376 LIBPTHREADS_LIBS="-lpthreads",
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
377 AC_SEARCH_LIBS(pthread_create, c_r,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
378 LIBPTHREADS_LIBS="-lc_r", thread_ok=no)))
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
379
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
380 if test "x$thread_ok" = "xno"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
381 AC_MSG_WARN([*** No pthreads found. ***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
382 AC_MSG_ERROR([*** Try setting LIBPTHREAD_LIBS manually to point to your pthreads library. ***])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
383 exit 1
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
384 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
385 AC_MSG_WARN([found a way to link threads, but it may not work...])
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
386 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
387 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
388 ;;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
389
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
390 esac
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
391 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
392
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
393 dnl --------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
394 dnl Command line options
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
395 dnl --------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
396 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
397 if test "x$enable_cookies" = "xno" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
398 CFLAGS="$CFLAGS -DDISABLE_COOKIES"
1520
2202238be236 fix DISABLE_COOKIES (reported by furaisanjin)
corvid <corvid@lavabit.com>
parents: 1235
diff changeset
399 CXXFLAGS="$CXXFLAGS -DDISABLE_COOKIES"
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
400 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
401 if test "x$enable_ipv6" = "xyes" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
402 CFLAGS="$CFLAGS -DENABLE_IPV6"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
403 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
404 if test "x$enable_efence" = "xyes" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
405 LIBS="-lefence $LIBS"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
406 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
407 if test "x$enable_gprof" = "xyes" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
408 CFLAGS="$CFLAGS -pg"
232
802c1d8bef55 - Fixed a typo bug in configure.in.
jcid
parents: 230
diff changeset
409 CXXFLAGS="$CXXFLAGS -pg"
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
410 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
411 if test "x$enable_insure" = "xyes" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
412 CC="insure -Zoi \"compiler $CC\""
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
413 LIBS="$LIBS -lstdc++-2-libc6.1-1-2.9.0"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
414 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
415 if test "x$enable_threaded_dns" = "xyes" ; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
416 CFLAGS="$CFLAGS -DD_DNS_THREADED"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
417 fi
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents: 300
diff changeset
418 if test "x$enable_rtfl" = "xyes" ; then
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents: 300
diff changeset
419 CXXFLAGS="$CXXFLAGS -DDBG_RTFL"
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents: 300
diff changeset
420 fi
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
421
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
422 dnl -----------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
423 dnl Checks for header files
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
424 dnl -----------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
425 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
426 AC_CHECK_HEADERS(fcntl.h unistd.h sys/uio.h)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
427
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
428 dnl --------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
429 dnl Check for compiler options
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
430 dnl --------------------------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
431 dnl
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
432 if eval "test x$GCC = xyes"; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
433 if test "`echo $CFLAGS | grep '\-D_REENTRANT' 2> /dev/null`" = ""; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
434 CFLAGS="$CFLAGS -D_REENTRANT"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
435 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
436 if test "`echo $CFLAGS | grep '\-D_THREAD_SAFE' 2> /dev/null`" = ""; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
437 CFLAGS="$CFLAGS -D_THREAD_SAFE"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
438 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
439 if test "`echo $CFLAGS | grep '\-Wall' 2> /dev/null`" = ""; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
440 CFLAGS="$CFLAGS -Wall"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
441 fi
884
8d747af3b6d7 Fix for 9144ba0845e7 (typo)
Jorge Arellano Cid <jcid@dillo.org>
parents: 882
diff changeset
442 if test "`echo $CFLAGS | grep -e '-W ' -e '-W$' 2> /dev/null`" = ""; then
882
9144ba0845e7 Added the -W flag to the CFLAGS variable (compilation)
Jorge Arellano Cid <jcid@dillo.org>
parents: 434
diff changeset
443 CFLAGS="$CFLAGS -W"
9144ba0845e7 Added the -W flag to the CFLAGS variable (compilation)
Jorge Arellano Cid <jcid@dillo.org>
parents: 434
diff changeset
444 fi
2020
477a93f3ce22 -Wno-unused-parameter for all gcc versions, not just 3.x
corvid <corvid@lavabit.com>
parents: 2019
diff changeset
445 if test "`echo $CFLAGS | grep '\-Wno-unused-parameter' 2> /dev/null`" = ""; then
477a93f3ce22 -Wno-unused-parameter for all gcc versions, not just 3.x
corvid <corvid@lavabit.com>
parents: 2019
diff changeset
446 CFLAGS="$CFLAGS -Wno-unused-parameter"
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
447 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
448 if test "`echo $CFLAGS | grep '\-Waggregate-return' 2> /dev/null`" = ""; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
449 CFLAGS="$CFLAGS -Waggregate-return"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
450 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
451 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
452 dnl -----------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
453 dnl CXX options
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
454 dnl -----------
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
455 dnl
996
2ed439264264 Added "-fno-rtti -fno-exceptions" to CXXFLAGS (reduces binary size)
Jorge Arellano Cid <jcid@dillo.org>
parents: 884
diff changeset
456
2ed439264264 Added "-fno-rtti -fno-exceptions" to CXXFLAGS (reduces binary size)
Jorge Arellano Cid <jcid@dillo.org>
parents: 884
diff changeset
457 if eval "test x$GCC = xyes"; then
2ed439264264 Added "-fno-rtti -fno-exceptions" to CXXFLAGS (reduces binary size)
Jorge Arellano Cid <jcid@dillo.org>
parents: 884
diff changeset
458 CXXFLAGS="$CXXFLAGS -Wall -W -Wno-unused-parameter -fno-rtti -fno-exceptions"
2ed439264264 Added "-fno-rtti -fno-exceptions" to CXXFLAGS (reduces binary size)
Jorge Arellano Cid <jcid@dillo.org>
parents: 884
diff changeset
459 fi
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
460
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
461 AC_SUBST(LIBJPEG_LIBS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
462 AC_SUBST(LIBJPEG_LDFLAGS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
463 AC_SUBST(LIBJPEG_CPPFLAGS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
464 AC_SUBST(LIBPNG_LIBS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
465 AC_SUBST(LIBPNG_CFLAGS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
466 AC_SUBST(LIBZ_LIBS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
467 AC_SUBST(LIBSSL_LIBS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
468 AC_SUBST(LIBPTHREAD_LIBS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
469 AC_SUBST(LIBPTHREAD_LDFLAGS)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
470 AC_SUBST(LIBFLTK_CXXFLAGS)
6
c390daa639ce Improved FLTK library detection at configure time.
jcid
parents: 0
diff changeset
471 AC_SUBST(LIBFLTK_CFLAGS)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
472 AC_SUBST(LIBFLTK_LIBS)
106
d63b130d8b24 - Added iconv tests for FreeBSD.
jcid
parents: 14
diff changeset
473 AC_SUBST(LIBICONV_LIBS)
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
474 AC_SUBST(datadir)
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
475
1775
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
476 AC_CONFIG_FILES([
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
477 Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
478 dlib/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
479 dpip/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
480 dpid/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
481 dpi/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
482 doc/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
483 dw/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
484 lout/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
485 src/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
486 src/IO/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
487 test/Makefile
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
488 ])
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
489
1775
d70c73254772 configure.in: fix the obsolete usage of AC_OUTPUT.
Jeremy Henty <onepoint@starurchin.org>
parents: 1573
diff changeset
490 AC_OUTPUT