Mercurial > gftp.yaz
annotate configure.in @ 37:5a178bd04ca5
2002-10-13 Brian Masney <masneyb@gftp.org>
* lib/gftp.h (struct gftp_config_vars_tag) - remove shown flag and
added ports_shown flag. Added GFTP_PORTS_TEXT, GFTP_PORTS_GTK,
and GFTP_PORTS_ALL flags
* lib/config_file.c - update to use new fields.
* lib/config_file.c, lib/options.h, lib/gftp.h - added new global
options: local_sortcol, local_sortasds, remote_sortcol, remote_sortasds
* src/gtk/gftp-gtk.c - sort based on parameters above. Also, if a url
was given on the command line, don't connect to it until the local side
has been setup
* src/gtk/options_dialog.c - only show variables that have GFTP_PORT_GTK
set
* src/text/gftp-text.c - add help screen for set command. Added command
clear cache. Sort the filelist based on the configuration options.
* configure.in - update to version 2.0.14
* cvsclean - clean up the Makefile.am file better
author | masneyb |
---|---|
date | Mon, 14 Oct 2002 02:46:14 +0000 |
parents | c8ec7877432e |
children | 450dbe540dd8 |
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) | |
37 | 6 AM_INIT_AUTOMAKE(gftp,2.0.14) |
1 | 7 |
8 AC_ARG_ENABLE(gtk20, [ --enable-gtk20 Try and compile with GTK+ 2.0 if available], enable_gtk20=1, enable_gtk20=0) | |
9 AC_ARG_ENABLE(gtkport, [ --disable-gtkport Disable compiling the GTK+ port], enable_gtkport=0, enable_gtkport=1) | |
10 AC_ARG_ENABLE(textport, [ --disable-textport Disable compiling the text port], enable_textport=0, enable_textport=1) | |
11 AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable the dmalloc library], enable_dmalloc=1, enable_dmalloc=0) | |
12 | |
13 AC_SUBST(PACKAGE) | |
14 AC_SUBST(VERSION) | |
15 AC_SUBST(PREFIX) | |
16 | |
18
6b2e606554aa
2002-09-11 Marius Andreiana <mandreiana@yahoo.com>
mandreiana
parents:
16
diff
changeset
|
17 ALL_LINGUAS="bg cs da de es fi fr it ja ko nl no pl pt_BR ro ru sv tr zh_CN zh_TW" |
1 | 18 |
16 | 19 AC_DEFINE(_GNU_SOURCE, 1, [Define for setting a GNU environment]) |
20 | |
1 | 21 AC_CANONICAL_HOST |
16 | 22 AC_PROG_CC |
23 AC_AIX | |
24 AC_MINIX | |
25 AC_EXEEXT | |
26 AC_PROG_RANLIB | |
27 AC_SYS_LARGEFILE | |
28 dnl AC_ISC_POSIX | |
29 AM_C_PROTOTYPES | |
30 AC_C_CONST | |
31 AC_C_INLINE | |
1 | 32 |
26 | 33 AM_MAINTAINER_MODE |
34 | |
1 | 35 AC_PROG_AWK |
36 AC_PROG_INSTALL | |
37 AC_PROG_LN_S | |
38 AC_PROG_MAKE_SET | |
39 | |
40 AC_HEADER_DIRENT | |
41 AC_HEADER_STDC | |
42 AC_HEADER_SYS_WAIT | |
43 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h) | |
44 | |
45 AC_TYPE_MODE_T | |
46 AC_TYPE_PID_T | |
47 AC_TYPE_SIZE_T | |
48 AC_HEADER_TIME | |
49 AC_STRUCT_TM | |
50 | |
51 AC_FUNC_ALLOCA | |
52 AC_PROG_GCC_TRADITIONAL | |
53 AC_FUNC_MMAP | |
54 AC_TYPE_SIGNAL | |
55 AC_FUNC_STRFTIME | |
56 AC_FUNC_UTIME_NULL | |
57 AC_CHECK_FUNCS(gai_strerror getaddrinfo getcwd gettimeofday getwd mkdir mktime putenv rmdir select socket strdup strstr strtod strtol uname) | |
58 | |
26 | 59 if test "x$GFTP_TEXT" = "x" -a "x$enable_gtk20" = "x0" ; then |
60 AM_PATH_GLIB(1.2.3, , AC_MSG_ERROR(gFTP needs GLIB 1.2.3 or higher)) | |
1 | 61 fi |
62 | |
26 | 63 if test "x$enable_gtk20" = "x1" ; then |
64 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0) | |
1 | 65 fi |
66 | |
67 GFTP_TEXT="" | |
68 EXTRA_LIBS="" | |
69 USE_READLINE="yes" | |
70 READLINE_LIBS="" | |
71 if test "x$enable_textport" = "x1" ; then | |
72 AC_CHECK_LIB(socket, socket, EXTRA_LIBS="-lsocket") | |
73 | |
74 AC_CHECK_LIB(nsl, gethostbyname, EXTRA_LIBS="$EXTRA_LIBS -lnsl") | |
75 | |
76 AC_MSG_CHECKING([whether to use readline]) | |
77 AC_ARG_WITH(readline, | |
78 [ --with-readline turn on readline [default=yes, default tries -lncurses, -lcurses, -ltermcap]], | |
79 [case "${withval}" in | |
80 yes) USE_READLINE="yes" ; AC_MSG_RESULT([yes]) ;; | |
81 no) USE_READLINE="no" ; AC_MSG_RESULT([no]) ;; | |
82 only) USE_READLINE="yes" | |
83 EXTRA_LIBREADLINE_DEPS=" " | |
84 AC_MSG_RESULT([yes (using only readline)]) ;; | |
85 *) USE_READLINE="yes" | |
86 EXTRA_LIBREADLINE_DEPS="${withval}" | |
87 AC_MSG_RESULT([yes (using extra libraries ${withval})]) ;; | |
88 esac],[AC_MSG_RESULT([${USE_READLINE}])]) | |
89 | |
90 dnl Checks for libraries. | |
91 dnl When checking readline, check using extra libraries first. | |
92 dnl We want to protect against the link somehow succeeding, but only | |
93 dnl failing at runtime, as seems to happen on some BSD systems. | |
94 if test "$USE_READLINE" = yes ; then | |
95 if test "$EXTRA_LIBREADLINE_DEPS" = "" ; then | |
96 unset ac_cv_lib_readline_readline | |
97 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
98 HAVE_LIBREADLINE=false, -lncurses) | |
99 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
100 echo " Using -lreadline -lncurses" | |
101 EXTRA_LIBREADLINE_DEPS=-lncurses | |
26 | 102 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 103 else |
104 unset ac_cv_lib_readline_readline | |
105 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
106 HAVE_LIBREADLINE=false, -lcurses) | |
107 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
108 echo " Using -lreadline -lcurses" | |
109 EXTRA_LIBREADLINE_DEPS=-lcurses | |
26 | 110 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 111 else |
112 unset ac_cv_lib_readline_readline | |
113 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
114 HAVE_LIBREADLINE=false, -ltermcap) | |
115 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
116 echo " Using -lreadline -ltermcap" | |
117 EXTRA_LIBREADLINE_DEPS=-ltermcap | |
26 | 118 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 119 else |
120 unset ac_cv_lib_readline_readline | |
121 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
122 HAVE_LIBREADLINE=false) | |
123 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
26 | 124 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 125 else |
26 | 126 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 127 fi |
128 fi | |
129 fi | |
130 fi | |
131 else | |
132 unset ac_cv_lib_readline_readline | |
133 AC_CHECK_LIB(readline, readline, HAVE_LIBREADLINE=true, | |
134 HAVE_LIBREADLINE=false, ${EXTRA_LIBREADLINE_DEPS}) | |
135 if test x${HAVE_LIBREADLINE} = xtrue ; then | |
136 echo " Using -lreadline ${EXTRA_LIBREADLINE_DEPS}" | |
26 | 137 AC_DEFINE(HAVE_LIBREADLINE, [1], [Define if the text port uses readline]) |
1 | 138 else |
26 | 139 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 140 fi |
141 fi | |
142 else | |
143 HAVE_LIBREADLINE=false | |
26 | 144 AC_DEFINE(HAVE_LIBREADLINE, [0], [Define if the text port uses readline]) |
1 | 145 fi |
146 if test x${HAVE_LIBREADLINE} = xtrue; then | |
147 READLINE_LIBS="-lreadline ${EXTRA_LIBREADLINE_DEPS}" | |
148 GFTP_TEXT="gftp-text" | |
149 fi | |
150 fi | |
151 | |
152 AC_CHECK_LIB(m, log10, EXTRA_LIBS="$EXTRA_LIBS -lm") | |
153 | |
26 | 154 AM_WITH_DMALLOC |
1 | 155 |
156 AC_SUBST(EXTRA_LIBS) | |
157 AC_SUBST(READLINE_LIBS) | |
158 AC_SUBST(GFTP_TEXT) | |
159 | |
160 GFTP_GTK="" | |
161 PTHREAD_CFLAGS="" | |
162 PTHREAD_LIBS="" | |
33 | 163 |
164 # I don't have PKG_CHECK_MODULES or AM_PATH_GLIB check for gthread because | |
165 # the text port doesn't need to be compiled against the thread libraries | |
166 GTHREAD_LIBS="" | |
167 | |
1 | 168 if test "x$enable_gtkport" = "x1" ; then |
169 if test "x$enable_gtk20" = "x1" ; then | |
170 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 1.3.8, GFTP_GTK=gftp-gtk) | |
171 fi | |
172 | |
173 if test "x$GFTP_GTK" = "x" ; then | |
174 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 | 175 GTHREAD_LIBS="-lgthread" |
176 else | |
177 GTHREAD_LIBS="-lgthread-2.0" | |
1 | 178 fi |
179 | |
180 if test "x$GFTP_GTK" = xgftp-gtk; then | |
181 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS="-lpthread") | |
182 | |
183 if test "x$PTHREAD_LIBS" = x ; then | |
184 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIBS="-lpthreads") | |
185 fi | |
186 | |
187 if test "x$PTHREAD_LIBS" = x ; then | |
188 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIBS="-lc_r") | |
189 fi | |
190 | |
191 if test "x$PTHREAD_LIBS" = x ; then | |
192 echo ; | |
193 echo "Error: Cannot find the pthread libraries. If you don't have them installed," ; | |
194 echo "your X libraries probably aren't thread safe either. You can download the" ; | |
195 echo "pthread library and the thread safe X libraries from my webpage at" ; | |
196 echo "http://www.gftp.org/. Note the pthread library and the thread safe" ; | |
197 echo "X libraries on my webpage are for Linux libc5 machines ONLY" ; | |
198 echo ; | |
199 exit | |
200 fi | |
201 | |
202 PTHREAD_CFLAGS="-D_REENTRANT" | |
203 | |
204 # I took some of these from the glib 1.3.3 configure.in | |
205 case $host in | |
206 *-hpux*) | |
207 # From H.Merijn Brand <h.m.brand@hccnet.nl> | |
208 echo '#define pthread_attr_init(x) __pthread_attr_init_system(x)' | |
209 +>>confdefs.h | |
210 ;; | |
211 *-aix*) | |
212 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
213 if test x"$GCC" = xyes; then | |
214 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -mthreads" | |
215 fi | |
216 ;; | |
217 *-freebsd*) | |
218 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
219 | |
220 # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support | |
221 # -mthreads flag. | |
222 ;; | |
223 *-openbsd*) | |
224 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" | |
225 if test "x$PTHREAD_LIBS" = "x-lc_r"; then | |
226 PTHREAD_LIBS="-pthread" | |
227 fi | |
228 ;; | |
229 *-sysv5uw7*) # UnixWare 7 | |
230 if test "$GCC" != "yes"; then | |
231 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -Kthread" | |
232 else | |
233 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -pthread" | |
234 fi | |
235 ;; | |
236 *-dg-dgux*) # DG/UX | |
237 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_POSIX4A_DRAFT10_SOURCE" | |
238 esac | |
239 fi | |
240 fi | |
241 AC_SUBST(PTHREAD_CFLAGS) | |
242 AC_SUBST(PTHREAD_LIBS) | |
33 | 243 AC_SUBST(GTHREAD_LIBS) |
1 | 244 AC_SUBST(GFTP_GTK) |
245 | |
28 | 246 AM_GNU_GETTEXT |
1 | 247 |
26 | 248 AC_OUTPUT(Makefile docs/Makefile docs/sample.gftp/Makefile src/gftp src/Makefile src/gtk/Makefile src/text/Makefile lib/Makefile gftp.spec) |