Mercurial > gftp.yaz
annotate configure.in @ 731:eed8ccfe3025
2006-03-31 Şİ?ygimantas BeruŞ£?ka <zygis@gnome.org>
* po/lt.po: Added Lithuanian translation.
* configure.in: Added lt to ALL_LINGUAS.
author | zygis |
---|---|
date | Fri, 31 Mar 2006 14:24:57 +0000 |
parents | 860636b6f744 |
children | aaabee793456 |
rev | line source |
---|---|
1 | 1 dnl Process this file with autoconf to produce a configure script. |
2 | |
3 AC_INIT(lib/gftp.h) | |
4 | |
5 AM_CONFIG_HEADER(config.h) | |
684 | 6 AM_INIT_AUTOMAKE(gftp,2.0.18) |
1 | 7 |
81 | 8 AC_ARG_ENABLE(gtk20, |
9 [ --disable-gtk20 Don't look for GTK+ 2.0 libraries], | |
10 enable_gtk20=$enableval, | |
11 enable_gtk20="yes") | |
12 | |
13 AC_ARG_ENABLE(gtkport, | |
14 [ --disable-gtkport Disable compiling the GTK+ port], | |
15 enable_gtkport=$enableval, | |
16 enable_gtkport="yes") | |
17 | |
18 AC_ARG_ENABLE(textport, | |
19 [ --disable-textport Disable compiling the text port], | |
20 enable_textport=$enableval, | |
21 enable_textport="yes") | |
215 | 22 AC_ARG_ENABLE(ssl, |
23 [ --disable-ssl Disable SSL support], | |
24 enable_ssl=$enableval, | |
25 enable_ssl="yes") | |
1 | 26 |
27 AC_SUBST(PACKAGE) | |
28 AC_SUBST(VERSION) | |
29 AC_SUBST(PREFIX) | |
30 | |
731
eed8ccfe3025
2006-03-31 Şİ?ygimantas BeruŞ£?ka <zygis@gnome.org>
zygis
parents:
726
diff
changeset
|
31 ALL_LINGUAS="am ar az be bg bn ca cs da de el en_CA en_GB es fi fr ga gl hr hu it ja ko lt mk ml ms nb ne nl no pa pl pt pt_BR ro ru rw sk sq sr sr@Latn sv ta th tr uk zh_CN zh_TW" |
1 | 32 |
33 AC_CANONICAL_HOST | |
16 | 34 AC_PROG_CC |
35 AC_AIX | |
36 AC_MINIX | |
37 AC_EXEEXT | |
38 AC_PROG_RANLIB | |
39 AC_SYS_LARGEFILE | |
40 dnl AC_ISC_POSIX | |
41 AM_C_PROTOTYPES | |
42 AC_C_CONST | |
43 AC_C_INLINE | |
328 | 44 AC_INTL_PRINTF |
1 | 45 |
26 | 46 AM_MAINTAINER_MODE |
47 | |
1 | 48 AC_PROG_AWK |
49 AC_PROG_INSTALL | |
50 AC_PROG_LN_S | |
51 AC_PROG_MAKE_SET | |
52 | |
53 AC_HEADER_DIRENT | |
54 AC_HEADER_STDC | |
55 AC_HEADER_SYS_WAIT | |
460 | 56 AC_CHECK_HEADERS(fcntl.h libutil.h limits.h malloc.h pty.h strings.h sys/ioctl.h sys/time.h unistd.h stdint.h sys/mkdev.h inttypes.h) |
1 | 57 |
684 | 58 dnl AM_TYPE_PTRDIFF_T |
202 | 59 AC_TYPE_SOCKLEN_T |
1 | 60 AC_TYPE_MODE_T |
478 | 61 AC_TYPE_INTPTR_T |
1 | 62 AC_TYPE_PID_T |
63 AC_TYPE_SIZE_T | |
64 AC_HEADER_TIME | |
65 AC_STRUCT_TM | |
435 | 66 AC_CHECK_SIZEOF(off_t) |
1 | 67 |
68 AC_FUNC_ALLOCA | |
69 AC_PROG_GCC_TRADITIONAL | |
70 AC_FUNC_MMAP | |
71 AC_TYPE_SIGNAL | |
72 AC_FUNC_STRFTIME | |
73 AC_FUNC_UTIME_NULL | |
213 | 74 AC_CHECK_FUNCS(gai_strerror getaddrinfo getcwd gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strstr strtod strtol uname grantpt openpty getdtablesize) |
1 | 75 |
81 | 76 if test "x$enable_gtk20" = "xyes" ; then |
57 | 77 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0, found_glib20=1, found_glib20=0) |
78 else | |
79 found_glib20=0; | |
80 fi | |
81 | |
82 if test "x$GFTP_TEXT" = "x" -a $found_glib20 = 0 ; then | |
26 | 83 AM_PATH_GLIB(1.2.3, , AC_MSG_ERROR(gFTP needs GLIB 1.2.3 or higher)) |
1 | 84 fi |
85 | |
93 | 86 EXTRA_LIBS="" |
87 | |
146 | 88 # FreeBSD needs this |
236 | 89 AC_CHECK_LIB(util, openpty, [EXTRA_LIBS="-lutil" |
90 AC_DEFINE(HAVE_OPENPTY, [1], [Define if you have the openpty function.]) ]) | |
146 | 91 |
57 | 92 AC_CHECK_LIB(socket, socket, EXTRA_LIBS="-lsocket") |
93 | |
94 AC_CHECK_LIB(nsl, gethostbyname, EXTRA_LIBS="$EXTRA_LIBS -lnsl") | |
1 | 95 |
96 GFTP_TEXT="" | |
97 USE_READLINE="yes" | |
98 READLINE_LIBS="" | |
81 | 99 if test "x$enable_textport" = "xyes" ; then |
230 | 100 GFTP_TEXT="gftp-text" |
101 | |
1 | 102 AC_MSG_CHECKING([whether to use readline]) |
103 AC_ARG_WITH(readline, | |
104 [ --with-readline turn on readline [default=yes, default tries -lncurses, -lcurses, -ltermcap]], | |
105 [case "${withval}" in | |
106 yes) USE_READLINE="yes" ; AC_MSG_RESULT([yes]) ;; | |
107 no) USE_READLINE="no" ; AC_MSG_RESULT([no]) ;; | |
108 only) USE_READLINE="yes" | |
109 EXTRA_LIBREADLINE_DEPS=" " | |
110 AC_MSG_RESULT([yes (using only readline)]) ;; | |
111 *) USE_READLINE="yes" | |
112 EXTRA_LIBREADLINE_DEPS="${withval}" | |
113 AC_MSG_RESULT([yes (using extra libraries ${withval})]) ;; | |
114 esac],[AC_MSG_RESULT([${USE_READLINE}])]) | |
115 | |
116 dnl Checks for libraries. | |
117 dnl When checking readline, check using extra libraries first. | |
118 dnl We want to protect against the link somehow succeeding, but only | |
119 dnl failing at runtime, as seems to happen on some BSD systems. | |
120 if test "$USE_READLINE" = yes ; then | |
121 if test "$EXTRA_LIBREADLINE_DEPS" = "" ; then | |
122 unset ac_cv_lib_readline_readline | |
123 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
124 HAVE_LIBREADLINE=false, -lncurses) | |
125 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
126 echo " Using -lreadline -lncurses" | |
127 EXTRA_LIBREADLINE_DEPS=-lncurses | |
26 | 128 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 129 else |
130 unset ac_cv_lib_readline_readline | |
131 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
132 HAVE_LIBREADLINE=false, -lcurses) | |
133 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
134 echo " Using -lreadline -lcurses" | |
135 EXTRA_LIBREADLINE_DEPS=-lcurses | |
26 | 136 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 137 else |
138 unset ac_cv_lib_readline_readline | |
139 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
140 HAVE_LIBREADLINE=false, -ltermcap) | |
141 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
142 echo " Using -lreadline -ltermcap" | |
143 EXTRA_LIBREADLINE_DEPS=-ltermcap | |
26 | 144 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 145 else |
146 unset ac_cv_lib_readline_readline | |
147 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
148 HAVE_LIBREADLINE=false) | |
149 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
26 | 150 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 151 else |
26 | 152 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 153 fi |
154 fi | |
155 fi | |
156 fi | |
157 else | |
158 unset ac_cv_lib_readline_readline | |
159 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
160 HAVE_LIBREADLINE=false, ${EXTRA_LIBREADLINE_DEPS}) | |
161 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
162 echo " Using -lreadline ${EXTRA_LIBREADLINE_DEPS}" | |
26 | 163 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 164 else |
26 | 165 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 166 fi |
167 fi | |
168 else | |
169 HAVE_LIBREADLINE=false | |
26 | 170 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 171 fi |
172 if test x${HAVE_LIBREADLINE} = xtrue; then | |
173 READLINE_LIBS="-lreadline ${EXTRA_LIBREADLINE_DEPS}" | |
174 fi | |
175 fi | |
176 | |
177 AC_CHECK_LIB(m, log10, EXTRA_LIBS="$EXTRA_LIBS -lm") | |
178 | |
26 | 179 AM_WITH_DMALLOC |
1 | 180 |
181 AC_SUBST(EXTRA_LIBS) | |
182 AC_SUBST(READLINE_LIBS) | |
183 AC_SUBST(GFTP_TEXT) | |
184 | |
185 GFTP_GTK="" | |
186 PTHREAD_CFLAGS="" | |
187 PTHREAD_LIBS="" | |
33 | 188 |
189 # I don't have PKG_CHECK_MODULES or AM_PATH_GLIB check for gthread because | |
190 # the text port doesn't need to be compiled against the thread libraries | |
191 GTHREAD_LIBS="" | |
192 | |
81 | 193 if test "x$enable_gtkport" = "xyes" ; then |
194 if test $found_glib20 = 1 -a "x$enable_gtk20" = "xyes" ; then | |
57 | 195 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0, GFTP_GTK=gftp-gtk, AC_MSG_ERROR(You have GLIB 2.0 installed but I cannot find GTK+ 2.0. Run configure with --disable-gtk20 or install GTK+ 2.0)) |
1 | 196 fi |
197 | |
198 if test "x$GFTP_GTK" = "x" ; then | |
199 AM_PATH_GTK(1.2.3, GFTP_GTK=gftp-gtk, AC_MSG_WARN(gFTP needs GTK+ 1.2.3 or higher for the graphical version. Only building the text version)) | |
33 | 200 GTHREAD_LIBS="-lgthread" |
201 else | |
202 GTHREAD_LIBS="-lgthread-2.0" | |
1 | 203 fi |
204 | |
205 if test "x$GFTP_GTK" = xgftp-gtk; then | |
480 | 206 case $host in |
207 *-hpux*) | |
208 AC_CHECK_LIB(rt, sem_init) | |
649 | 209 |
210 # From H.Merijn Brand <h.m.brand@hccnet.nl> | |
211 echo '#define pthread_attr_init(x) __pthread_attr_init_system(x)' >>confdefs.h | |
212 echo '#define pthread_create(x) __pthread_create_system(x)' >>confdefs.h | |
480 | 213 ;; |
214 esac | |
215 | |
1 | 216 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS="-lpthread") |
217 | |
218 if test "x$PTHREAD_LIBS" = x ; then | |
219 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIBS="-lpthreads") | |
220 fi | |
221 | |
222 if test "x$PTHREAD_LIBS" = x ; then | |
223 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIBS="-lc_r") | |
224 fi | |
225 | |
226 if test "x$PTHREAD_LIBS" = x ; then | |
227 echo ; | |
228 echo "Error: Cannot find the pthread libraries. If you don't have them installed," ; | |
229 echo "your X libraries probably aren't thread safe either. You can download the" ; | |
230 echo "pthread library and the thread safe X libraries from my webpage at" ; | |
231 echo "http://www.gftp.org/. Note the pthread library and the thread safe" ; | |
232 echo "X libraries on my webpage are for Linux libc5 machines ONLY" ; | |
233 echo ; | |
234 exit | |
235 fi | |
236 | |
237 PTHREAD_CFLAGS="-D_REENTRANT" | |
238 | |
239 # I took some of these from the glib 1.3.3 configure.in | |
240 case $host in | |
241 *-aix*) | |
242 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
243 if test x"$GCC" = xyes; then | |
244 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -mthreads" | |
245 fi | |
246 ;; | |
247 *-freebsd*) | |
248 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
249 | |
250 # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support | |
251 # -mthreads flag. | |
252 ;; | |
253 *-openbsd*) | |
254 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
255 if test "x$PTHREAD_LIBS" = "x-lc_r"; then | |
256 PTHREAD_LIBS="-pthread" | |
257 fi | |
258 ;; | |
259 *-sysv5uw7*) # UnixWare 7 | |
260 if test "$GCC" != "yes"; then | |
261 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -Kthread" | |
262 else | |
263 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -pthread" | |
264 fi | |
265 ;; | |
266 *-dg-dgux*) # DG/UX | |
267 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_POSIX4A_DRAFT10_SOURCE" | |
268 esac | |
269 fi | |
270 fi | |
271 AC_SUBST(PTHREAD_CFLAGS) | |
272 AC_SUBST(PTHREAD_LIBS) | |
33 | 273 AC_SUBST(GTHREAD_LIBS) |
1 | 274 AC_SUBST(GFTP_GTK) |
275 | |
215 | 276 SSL_LIBS="" |
277 if test "x$enable_ssl" = "xyes" ; then | |
278 AC_CHECK_HEADERS(openssl/ssl.h ssl.h) | |
279 | |
280 if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then | |
281 AC_CHECK_LIB(ssl, SSL_library_init, SSL_LIBS="-lcrypto -lssl") | |
282 | |
283 if test "x$SSL_LIBS" != "x" ; then | |
284 AC_DEFINE(USE_SSL, 1, | |
285 [define if you want to enable SSL support]) | |
286 fi | |
287 fi | |
288 fi | |
289 AC_SUBST(SSL_LIBS) | |
290 | |
166 | 291 AM_GNU_GETTEXT |
1 | 292 |
307 | 293 AC_CHECK_PROG(DB2HTML, db2html, true, false) |
294 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) | |
295 | |
663 | 296 AC_OUTPUT(Makefile docs/Makefile docs/sample.gftp/Makefile lib/Makefile lib/fsplib/Makefile src/gftp src/Makefile src/uicommon/Makefile src/gtk/Makefile src/text/Makefile gftp.spec intl/Makefile po/Makefile.in ) |