annotate aclocal.m4 @ 146:782f84694489

2003-4-25 Brian Masney <masneyb@gftp.org> * lib/rfc959.c - added IPV6 support (RFC2428). The only part of the project that isn't IPV6 ready is the proxy comparsion functions. * lib/protocols.c - change the hints.ai_family paramater from AF_INET to PF_UNSPEC * lib/gftp.h lib/misc.c lib/pty.c - moved the functionality of pty[ms]_open() to pty.c. Combined these 2 functions into open_ptys(), and there is one defined for each system type (lots of #define's in this file!) * lib/Makefile.am po/POTFILES.in - added pty.c * lib/sshv2.c - when searching for the password prompt, omit the first character in case it is capitalized. Also, use the new function open_ptys() * configure.in - search for openpty in -lutil. Also, define HAVE_OPENPTY if this function is present on the system
author masneyb
date Sat, 26 Apr 2003 15:26:42 +0000
parents 5c952c5cb438
children a4bf947e9e22
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
2
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
4 dnl This file is free software; the Free Software Foundation
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
5 dnl gives unlimited permission to copy and/or distribute it,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
6 dnl with or without modifications, as long as this notice is preserved.
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
7
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
8 dnl This program is distributed in the hope that it will be useful,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
11 dnl PARTICULAR PURPOSE.
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
12
143
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
13 #serial 4
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
14
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
15 dnl By default, many hosts won't let programs access large files;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
16 dnl one must use special compiler options to get large-file access to work.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
17 dnl For more details about this brain damage please see:
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
18 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
19
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
20 dnl Written by Paul Eggert <eggert@twinsun.com>.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
21
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
22 dnl Internal subroutine of AC_SYS_LARGEFILE.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
23 dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
24 AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
25 [AC_CACHE_CHECK([for $1 value to request large file support],
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
26 ac_cv_sys_largefile_$1,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
27 [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
28 ac_cv_sys_largefile_$1=no
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
29 ifelse($1, CFLAGS,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
30 [case "$host_os" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
31 # IRIX 6.2 and later require cc -n32.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
32 changequote(, )dnl
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
33 irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
34 changequote([, ])dnl
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
35 if test "$GCC" != yes; then
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
36 ac_cv_sys_largefile_CFLAGS=-n32
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
37 fi
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
38 ac_save_CC="$CC"
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
39 CC="$CC $ac_cv_sys_largefile_CFLAGS"
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
40 AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
41 CC="$ac_save_CC"
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
42 esac])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
43 }])])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
44
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
45 dnl Internal subroutine of AC_SYS_LARGEFILE.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
46 dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
47 AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
48 [case $2 in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
49 no) ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
50 ?*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
51 case "[$]$1" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
52 '') $1=$2 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
53 *) $1=[$]$1' '$2 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
54 esac ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
55 esac])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
56
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
57 dnl Internal subroutine of AC_SYS_LARGEFILE.
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
58 dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
59 AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
60 [AC_CACHE_CHECK([for $1], $2,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
61 [$2=no
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
62 changequote(, )dnl
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
63 $4
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
64 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
65 case "$ac_flag" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
66 -D$1)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
67 $2=1 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
68 -D$1=*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
69 $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
70 esac
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
71 done
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
72 changequote([, ])dnl
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
73 ])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
74 if test "[$]$2" != no; then
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
75 AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
76 fi])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
77
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
78 AC_DEFUN(AC_SYS_LARGEFILE,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
79 [AC_REQUIRE([AC_CANONICAL_HOST])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
80 AC_ARG_ENABLE(largefile,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
81 [ --disable-largefile omit support for large files])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
82 if test "$enable_largefile" != no; then
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
83 AC_CHECK_TOOL(GETCONF, getconf)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
84 AC_SYS_LARGEFILE_FLAGS(CFLAGS)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
85 AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
86 AC_SYS_LARGEFILE_FLAGS(LIBS)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
87
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
88 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
89 case "$ac_flag" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
90 no) ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
91 -D_FILE_OFFSET_BITS=*) ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
92 -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
93 -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
94 -D?* | -I?*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
95 AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
96 *)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
97 AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
98 esac
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
99 done
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
100 AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
101 AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
102 AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
103 ac_cv_sys_file_offset_bits,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
104 [Number of bits in a file offset, on hosts where this is settable.]
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
105 [case "$host_os" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
106 # HP-UX 10.20 and later
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
107 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
108 ac_cv_sys_file_offset_bits=64 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
109 esac])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
110 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
111 ac_cv_sys_largefile_source,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
112 [Define to make fseeko etc. visible, on some hosts.],
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
113 [case "$host_os" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
114 # HP-UX 10.20 and later
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
115 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
116 ac_cv_sys_largefile_source=1 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
117 esac])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
118 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
119 ac_cv_sys_large_files,
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
120 [Define for large files, on AIX-style hosts.],
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
121 [case "$host_os" in
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
122 # AIX 4.2 and later
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
123 aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
124 ac_cv_sys_large_files=1 ;;
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
125 esac])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
126 fi
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
127 ])
5c952c5cb438 2003-4-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
128
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
129 # Like AC_CONFIG_HEADER, but automatically create stamp file.
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
130
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
131 AC_DEFUN([AM_CONFIG_HEADER],
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
132 [AC_PREREQ([2.12])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
133 AC_CONFIG_HEADER([$1])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
134 dnl When config.status generates a header, we must update the stamp-h file.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
135 dnl This file resides in the same directory as the config header
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
136 dnl that is generated. We must strip everything past the first ":",
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
137 dnl and everything past the last "/".
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
138 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
139 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
140 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
141 <<am_indx=1
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
142 for am_file in <<$1>>; do
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
143 case " <<$>>CONFIG_HEADERS " in
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
144 *" <<$>>am_file "*<<)>>
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
145 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
146 ;;
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
147 esac
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
148 am_indx=`expr "<<$>>am_indx" + 1`
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
149 done<<>>dnl>>)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
150 changequote([,]))])
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
151
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
152 # Do all the work for Automake. This macro actually does too much --
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
153 # some checks are only needed if your package does certain things.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
154 # But this isn't really a big deal.
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
155
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
156 # serial 1
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
157
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
158 dnl Usage:
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
159 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
160
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
161 AC_DEFUN([AM_INIT_AUTOMAKE],
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
162 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
163 AC_REQUIRE([AC_PROG_INSTALL])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
164 PACKAGE=[$1]
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
165 AC_SUBST(PACKAGE)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
166 VERSION=[$2]
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
167 AC_SUBST(VERSION)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
168 dnl test to see if srcdir already configured
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
169 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
170 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
171 fi
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
172 ifelse([$3],,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
173 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
174 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
175 AC_REQUIRE([AM_SANITY_CHECK])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
176 AC_REQUIRE([AC_ARG_PROGRAM])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
177 dnl FIXME This is truly gross.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
178 missing_dir=`cd $ac_aux_dir && pwd`
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
179 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
180 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
181 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
182 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
183 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
184 AC_REQUIRE([AC_PROG_MAKE_SET])])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
185
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
186 # Copyright 2002 Free Software Foundation, Inc.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
187
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
188 # This program is free software; you can redistribute it and/or modify
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
189 # it under the terms of the GNU General Public License as published by
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
190 # the Free Software Foundation; either version 2, or (at your option)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
191 # any later version.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
192
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
193 # This program is distributed in the hope that it will be useful,
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
194 # but WITHOUT ANY WARRANTY; without even the implied warranty of
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
195 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
196 # GNU General Public License for more details.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
197
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
198 # You should have received a copy of the GNU General Public License
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
199 # along with this program; if not, write to the Free Software
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
200 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
201
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
202 # AM_AUTOMAKE_VERSION(VERSION)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
203 # ----------------------------
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
204 # Automake X.Y traces this macro to ensure aclocal.m4 has been
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
205 # generated from the m4 files accompanying Automake X.Y.
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
206 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
207
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
208 # AM_SET_CURRENT_AUTOMAKE_VERSION
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
209 # -------------------------------
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
210 # Call AM_AUTOMAKE_VERSION so it can be traced.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
211 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
212 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
213 [AM_AUTOMAKE_VERSION([1.4-p6])])
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
214
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
215 #
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
216 # Check to make sure that the build environment is sane.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
217 #
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
218
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
219 AC_DEFUN([AM_SANITY_CHECK],
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
220 [AC_MSG_CHECKING([whether build environment is sane])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
221 # Just in case
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
222 sleep 1
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
223 echo timestamp > conftestfile
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
224 # Do `set' in a subshell so we don't clobber the current shell's
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
225 # arguments. Must try -L first in case configure is actually a
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
226 # symlink; some systems play weird games with the mod time of symlinks
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
227 # (eg FreeBSD returns the mod time of the symlink's containing
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
228 # directory).
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
229 if (
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
230 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
231 if test "[$]*" = "X"; then
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
232 # -L didn't work.
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
233 set X `ls -t $srcdir/configure conftestfile`
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
234 fi
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
235 if test "[$]*" != "X $srcdir/configure conftestfile" \
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
236 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
237
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
238 # If neither matched, then we have a broken ls. This can happen
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
239 # if, for instance, CONFIG_SHELL is bash and it inherits a
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
240 # broken ls alias from the environment. This has actually
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
241 # happened. Such a system could not be considered "sane".
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
242 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
243 alias in your environment])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
244 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
245
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
246 test "[$]2" = conftestfile
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
247 )
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
248 then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
249 # Ok.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
250 :
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
251 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
252 AC_MSG_ERROR([newly created file is older than distributed files!
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
253 Check your system clock])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
254 fi
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
255 rm -f conftest*
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
256 AC_MSG_RESULT(yes)])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
257
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
258 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
259 dnl The program must properly implement --version.
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
260 AC_DEFUN([AM_MISSING_PROG],
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
261 [AC_MSG_CHECKING(for working $2)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
262 # Run test in a subshell; some versions of sh will print an error if
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
263 # an executable is not found, even if stderr is redirected.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
264 # Redirect stdin to placate older versions of autoconf. Sigh.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
265 if ($2 --version) < /dev/null > /dev/null 2>&1; then
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
266 $1=$2
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
267 AC_MSG_RESULT(found)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
268 else
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
269 $1="$3/missing $2"
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
270 AC_MSG_RESULT(missing)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
271 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
272 AC_SUBST($1)])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
273
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
274
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
275 # serial 1
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
276
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
277 AC_DEFUN([AM_C_PROTOTYPES],
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
278 [AC_REQUIRE([AM_PROG_CC_STDC])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
279 AC_REQUIRE([AC_PROG_CPP])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
280 AC_MSG_CHECKING([for function prototypes])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
281 if test "$am_cv_prog_cc_stdc" != no; then
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
282 AC_MSG_RESULT(yes)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
283 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
284 U= ANSI2KNR=
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
285 else
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
286 AC_MSG_RESULT(no)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
287 U=_ ANSI2KNR=./ansi2knr
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
288 # Ensure some checks needed by ansi2knr itself.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
289 AC_HEADER_STDC
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
290 AC_CHECK_HEADERS(string.h)
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
291 fi
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
292 AC_SUBST(U)dnl
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
293 AC_SUBST(ANSI2KNR)dnl
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
294 ])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
295
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
296
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
297 # serial 1
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
298
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
299 # @defmac AC_PROG_CC_STDC
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
300 # @maindex PROG_CC_STDC
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
301 # @ovindex CC
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
302 # If the C compiler in not in ANSI C mode by default, try to add an option
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
303 # to output variable @code{CC} to make it so. This macro tries various
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
304 # options that select ANSI C on some system or another. It considers the
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
305 # compiler to be in ANSI C mode if it handles function prototypes correctly.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
306 #
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
307 # If you use this macro, you should check after calling it whether the C
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
308 # compiler has been set to accept ANSI C; if not, the shell variable
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
309 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
310 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
311 # program @code{ansi2knr}, which comes with Ghostscript.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
312 # @end defmac
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
313
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
314 AC_DEFUN([AM_PROG_CC_STDC],
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
315 [AC_REQUIRE([AC_PROG_CC])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
316 AC_BEFORE([$0], [AC_C_INLINE])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
317 AC_BEFORE([$0], [AC_C_CONST])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
318 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
319 dnl a magic option to avoid problems with ANSI preprocessor commands
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
320 dnl like #elif.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
321 dnl FIXME: can't do this because then AC_AIX won't work due to a
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
322 dnl circular dependency.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
323 dnl AC_BEFORE([$0], [AC_PROG_CPP])
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
324 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
325 AC_CACHE_VAL(am_cv_prog_cc_stdc,
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
326 [am_cv_prog_cc_stdc=no
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
327 ac_save_CC="$CC"
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
328 # Don't try gcc -ansi; that turns off useful extensions and
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
329 # breaks some systems' header files.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
330 # AIX -qlanglvl=ansi
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
331 # Ultrix and OSF/1 -std1
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
332 # HP-UX -Aa -D_HPUX_SOURCE
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
333 # SVR4 -Xc -D__EXTENSIONS__
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
334 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
335 do
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
336 CC="$ac_save_CC $ac_arg"
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
337 AC_TRY_COMPILE(
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
338 [#include <stdarg.h>
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
339 #include <stdio.h>
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
340 #include <sys/types.h>
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
341 #include <sys/stat.h>
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
342 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
343 struct buf { int x; };
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
344 FILE * (*rcsopen) (struct buf *, struct stat *, int);
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
345 static char *e (p, i)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
346 char **p;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
347 int i;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
348 {
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
349 return p[i];
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
350 }
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
351 static char *f (char * (*g) (char **, int), char **p, ...)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
352 {
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
353 char *s;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
354 va_list v;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
355 va_start (v,p);
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
356 s = g (p, va_arg (v,int));
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
357 va_end (v);
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
358 return s;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
359 }
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
360 int test (int i, double x);
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
361 struct s1 {int (*f) (int a);};
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
362 struct s2 {int (*f) (double a);};
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
363 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
364 int argc;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
365 char **argv;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
366 ], [
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
367 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
368 ],
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
369 [am_cv_prog_cc_stdc="$ac_arg"; break])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
370 done
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
371 CC="$ac_save_CC"
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
372 ])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
373 if test -z "$am_cv_prog_cc_stdc"; then
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
374 AC_MSG_RESULT([none needed])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
375 else
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
376 AC_MSG_RESULT($am_cv_prog_cc_stdc)
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
377 fi
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
378 case "x$am_cv_prog_cc_stdc" in
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
379 x|xno) ;;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
380 *) CC="$CC $am_cv_prog_cc_stdc" ;;
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
381 esac
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
382 ])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
383
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
384 # Add --enable-maintainer-mode option to configure.
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
385 # From Jim Meyering
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
386
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
387 # serial 1
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
388
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
389 AC_DEFUN([AM_MAINTAINER_MODE],
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
390 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
391 dnl maintainer-mode is disabled by default
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
392 AC_ARG_ENABLE(maintainer-mode,
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
393 [ --enable-maintainer-mode enable make rules and dependencies not useful
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
394 (and sometimes confusing) to the casual installer],
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
395 USE_MAINTAINER_MODE=$enableval,
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
396 USE_MAINTAINER_MODE=no)
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
397 AC_MSG_RESULT($USE_MAINTAINER_MODE)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
398 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
399 MAINT=$MAINTAINER_MODE_TRUE
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
400 AC_SUBST(MAINT)dnl
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
401 ]
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
402 )
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
403
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
404 # Define a conditional.
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
405
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
406 AC_DEFUN([AM_CONDITIONAL],
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
407 [AC_SUBST($1_TRUE)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
408 AC_SUBST($1_FALSE)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
409 if $2; then
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
410 $1_TRUE=
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
411 $1_FALSE='#'
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
412 else
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
413 $1_TRUE='#'
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
414 $1_FALSE=
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
415 fi])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
416
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
417
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
418 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
419 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
420 dnl also defines GSTUFF_PKG_ERRORS on error
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
421 AC_DEFUN(PKG_CHECK_MODULES, [
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
422 succeeded=no
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
423
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
424 if test -z "$PKG_CONFIG"; then
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
425 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
426 fi
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
427
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
428 if test "$PKG_CONFIG" = "no" ; then
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
429 echo "*** The pkg-config script could not be found. Make sure it is"
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
430 echo "*** in your path, or set the PKG_CONFIG environment variable"
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
431 echo "*** to the full path to pkg-config."
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
432 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
433 else
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
434 PKG_CONFIG_MIN_VERSION=0.9.0
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
435 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
436 AC_MSG_CHECKING(for $2)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
437
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
438 if $PKG_CONFIG --exists "$2" ; then
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
439 AC_MSG_RESULT(yes)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
440 succeeded=yes
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
441
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
442 AC_MSG_CHECKING($1_CFLAGS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
443 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
444 AC_MSG_RESULT($$1_CFLAGS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
445
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
446 AC_MSG_CHECKING($1_LIBS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
447 $1_LIBS=`$PKG_CONFIG --libs "$2"`
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
448 AC_MSG_RESULT($$1_LIBS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
449 else
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
450 $1_CFLAGS=""
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
451 $1_LIBS=""
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
452 ## If we have a custom action on failure, don't print errors, but
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
453 ## do set a variable so people can do so.
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
454 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
455 ifelse([$4], ,echo $$1_PKG_ERRORS,)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
456 fi
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
457
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
458 AC_SUBST($1_CFLAGS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
459 AC_SUBST($1_LIBS)
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
460 else
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
461 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
462 echo "*** See http://www.freedesktop.org/software/pkgconfig"
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
463 fi
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
464 fi
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
465
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
466 if test $succeeded = yes; then
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
467 ifelse([$3], , :, [$3])
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
468 else
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
469 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
470 fi
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
471 ])
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
472
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
473
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 33
diff changeset
474
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
475 # Configure paths for GLIB
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
476 # Owen Taylor 97-11-3
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
477
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
478 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
479 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
480 dnl gthread is specified in MODULES, pass to glib-config
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
481 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
482 AC_DEFUN(AM_PATH_GLIB,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
483 [dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
484 dnl Get the cflags and libraries from the glib-config script
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
485 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
486 AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
487 glib_config_prefix="$withval", glib_config_prefix="")
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
488 AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
489 glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
490 AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
491 , enable_glibtest=yes)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
492
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
493 if test x$glib_config_exec_prefix != x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
494 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
495 if test x${GLIB_CONFIG+set} != xset ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
496 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
497 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
498 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
499 if test x$glib_config_prefix != x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
500 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
501 if test x${GLIB_CONFIG+set} != xset ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
502 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
503 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
504 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
505
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
506 for module in . $4
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
507 do
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
508 case "$module" in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
509 gmodule)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
510 glib_config_args="$glib_config_args gmodule"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
511 ;;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
512 gthread)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
513 glib_config_args="$glib_config_args gthread"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
514 ;;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
515 esac
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
516 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
517
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
518 AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
519 min_glib_version=ifelse([$1], ,0.99.7,$1)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
520 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
521 no_glib=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
522 if test "$GLIB_CONFIG" = "no" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
523 no_glib=yes
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
524 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
525 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
526 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
527 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
528 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
529 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
530 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
531 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
532 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
533 if test "x$enable_glibtest" = "xyes" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
534 ac_save_CFLAGS="$CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
535 ac_save_LIBS="$LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
536 CFLAGS="$CFLAGS $GLIB_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
537 LIBS="$GLIB_LIBS $LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
538 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
539 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
540 dnl checks the results of glib-config to some extent
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
541 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
542 rm -f conf.glibtest
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
543 AC_TRY_RUN([
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
544 #include <glib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
545 #include <stdio.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
546 #include <stdlib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
547
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
548 int
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
549 main ()
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
550 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
551 int major, minor, micro;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
552 char *tmp_version;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
553
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
554 system ("touch conf.glibtest");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
555
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
556 /* HP/UX 9 (%@#!) writes to sscanf strings */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
557 tmp_version = g_strdup("$min_glib_version");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
558 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
559 printf("%s, bad version string\n", "$min_glib_version");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
560 exit(1);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
561 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
562
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
563 if ((glib_major_version != $glib_config_major_version) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
564 (glib_minor_version != $glib_config_minor_version) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
565 (glib_micro_version != $glib_config_micro_version))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
566 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
567 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
568 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
569 glib_major_version, glib_minor_version, glib_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
570 printf ("*** was found! If glib-config was correct, then it is best\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
571 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
572 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
573 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
574 printf("*** required on your system.\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
575 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
576 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
577 printf("*** before re-running configure\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
578 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
579 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
580 (glib_minor_version != GLIB_MINOR_VERSION) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
581 (glib_micro_version != GLIB_MICRO_VERSION))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
582 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
583 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
584 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
585 printf("*** library (version %d.%d.%d)\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
586 glib_major_version, glib_minor_version, glib_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
587 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
588 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
589 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
590 if ((glib_major_version > major) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
591 ((glib_major_version == major) && (glib_minor_version > minor)) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
592 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
593 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
594 return 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
595 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
596 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
597 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
598 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
599 glib_major_version, glib_minor_version, glib_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
600 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
601 major, minor, micro);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
602 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
603 printf("***\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
604 printf("*** If you have already installed a sufficiently new version, this error\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
605 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
606 printf("*** being found. The easiest way to fix this is to remove the old version\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
607 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
608 printf("*** correct copy of glib-config. (In this case, you will have to\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
609 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
610 printf("*** so that the correct libraries are found at run-time))\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
611 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
612 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
613 return 1;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
614 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
615 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
616 CFLAGS="$ac_save_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
617 LIBS="$ac_save_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
618 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
619 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
620 if test "x$no_glib" = x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
621 AC_MSG_RESULT(yes)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
622 ifelse([$2], , :, [$2])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
623 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
624 AC_MSG_RESULT(no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
625 if test "$GLIB_CONFIG" = "no" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
626 echo "*** The glib-config script installed by GLIB could not be found"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
627 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
628 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
629 echo "*** full path to glib-config."
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
630 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
631 if test -f conf.glibtest ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
632 :
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
633 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
634 echo "*** Could not run GLIB test program, checking why..."
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
635 CFLAGS="$CFLAGS $GLIB_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
636 LIBS="$LIBS $GLIB_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
637 AC_TRY_LINK([
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
638 #include <glib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
639 #include <stdio.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
640 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
641 [ echo "*** The test program compiled, but did not run. This usually means"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
642 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
643 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
644 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
645 echo "*** to the installed location Also, make sure you have run ldconfig if that"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
646 echo "*** is required on your system"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
647 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
648 echo "*** If you have an old version installed, it is best to remove it, although"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
649 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
650 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
651 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
652 echo "*** came with the system with the command"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
653 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
654 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
655 [ echo "*** The test program failed to compile or link. See the file config.log for the"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
656 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
657 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
658 echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
659 CFLAGS="$ac_save_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
660 LIBS="$ac_save_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
661 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
662 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
663 GLIB_CFLAGS=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
664 GLIB_LIBS=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
665 ifelse([$3], , :, [$3])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
666 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
667 AC_SUBST(GLIB_CFLAGS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
668 AC_SUBST(GLIB_LIBS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
669 rm -f conf.glibtest
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
670 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
671
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 16
diff changeset
672
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
673 # serial 1
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
674
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
675 AC_DEFUN([AM_WITH_DMALLOC],
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
676 [AC_MSG_CHECKING(if malloc debugging is wanted)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
677 AC_ARG_WITH(dmalloc,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
678 [ --with-dmalloc use dmalloc, as in
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
679 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
680 [if test "$withval" = yes; then
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
681 AC_MSG_RESULT(yes)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
682 AC_DEFINE(WITH_DMALLOC,1,
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
683 [Define if using the dmalloc debugging malloc package])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
684 LIBS="$LIBS -ldmalloc"
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
685 LDFLAGS="$LDFLAGS -g"
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
686 else
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
687 AC_MSG_RESULT(no)
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
688 fi], [AC_MSG_RESULT(no)])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
689 ])
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
690
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
691 # Configure paths for GTK+
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
692 # Owen Taylor 97-11-3
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
693
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
694 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
695 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
696 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
697 AC_DEFUN(AM_PATH_GTK,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
698 [dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
699 dnl Get the cflags and libraries from the gtk-config script
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
700 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
701 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
702 gtk_config_prefix="$withval", gtk_config_prefix="")
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
703 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
704 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
705 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
706 , enable_gtktest=yes)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
707
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
708 for module in . $4
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
709 do
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
710 case "$module" in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
711 gthread)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
712 gtk_config_args="$gtk_config_args gthread"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
713 ;;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
714 esac
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
715 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
716
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
717 if test x$gtk_config_exec_prefix != x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
718 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
719 if test x${GTK_CONFIG+set} != xset ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
720 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
721 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
722 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
723 if test x$gtk_config_prefix != x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
724 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
725 if test x${GTK_CONFIG+set} != xset ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
726 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
727 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
728 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
729
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
730 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
731 min_gtk_version=ifelse([$1], ,0.99.7,$1)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
732 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
733 no_gtk=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
734 if test "$GTK_CONFIG" = "no" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
735 no_gtk=yes
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
736 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
737 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
738 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
739 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
740 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
741 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
742 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
743 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
744 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
745 if test "x$enable_gtktest" = "xyes" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
746 ac_save_CFLAGS="$CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
747 ac_save_LIBS="$LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
748 CFLAGS="$CFLAGS $GTK_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
749 LIBS="$GTK_LIBS $LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
750 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
751 dnl Now check if the installed GTK is sufficiently new. (Also sanity
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
752 dnl checks the results of gtk-config to some extent
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
753 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
754 rm -f conf.gtktest
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
755 AC_TRY_RUN([
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
756 #include <gtk/gtk.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
757 #include <stdio.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
758 #include <stdlib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
759
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
760 int
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
761 main ()
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
762 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
763 int major, minor, micro;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
764 char *tmp_version;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
765
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
766 system ("touch conf.gtktest");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
767
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
768 /* HP/UX 9 (%@#!) writes to sscanf strings */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
769 tmp_version = g_strdup("$min_gtk_version");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
770 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
771 printf("%s, bad version string\n", "$min_gtk_version");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
772 exit(1);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
773 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
774
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
775 if ((gtk_major_version != $gtk_config_major_version) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
776 (gtk_minor_version != $gtk_config_minor_version) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
777 (gtk_micro_version != $gtk_config_micro_version))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
778 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
779 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
780 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
781 gtk_major_version, gtk_minor_version, gtk_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
782 printf ("*** was found! If gtk-config was correct, then it is best\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
783 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
784 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
785 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
786 printf("*** required on your system.\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
787 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
788 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
789 printf("*** before re-running configure\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
790 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
791 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
792 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
793 (gtk_minor_version != GTK_MINOR_VERSION) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
794 (gtk_micro_version != GTK_MICRO_VERSION))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
795 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
796 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
797 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
798 printf("*** library (version %d.%d.%d)\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
799 gtk_major_version, gtk_minor_version, gtk_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
800 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
801 #endif /* defined (GTK_MAJOR_VERSION) ... */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
802 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
803 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
804 if ((gtk_major_version > major) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
805 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
806 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
807 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
808 return 0;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
809 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
810 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
811 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
812 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
813 gtk_major_version, gtk_minor_version, gtk_micro_version);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
814 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
815 major, minor, micro);
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
816 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
817 printf("***\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
818 printf("*** If you have already installed a sufficiently new version, this error\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
819 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
820 printf("*** being found. The easiest way to fix this is to remove the old version\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
821 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
822 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
823 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
824 printf("*** so that the correct libraries are found at run-time))\n");
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
825 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
826 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
827 return 1;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
828 }
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
829 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
830 CFLAGS="$ac_save_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
831 LIBS="$ac_save_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
832 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
833 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
834 if test "x$no_gtk" = x ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
835 AC_MSG_RESULT(yes)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
836 ifelse([$2], , :, [$2])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
837 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
838 AC_MSG_RESULT(no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
839 if test "$GTK_CONFIG" = "no" ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
840 echo "*** The gtk-config script installed by GTK could not be found"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
841 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
842 echo "*** your path, or set the GTK_CONFIG environment variable to the"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
843 echo "*** full path to gtk-config."
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
844 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
845 if test -f conf.gtktest ; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
846 :
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
847 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
848 echo "*** Could not run GTK test program, checking why..."
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
849 CFLAGS="$CFLAGS $GTK_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
850 LIBS="$LIBS $GTK_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
851 AC_TRY_LINK([
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
852 #include <gtk/gtk.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
853 #include <stdio.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
854 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
855 [ echo "*** The test program compiled, but did not run. This usually means"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
856 echo "*** that the run-time linker is not finding GTK or finding the wrong"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
857 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
858 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
859 echo "*** to the installed location Also, make sure you have run ldconfig if that"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
860 echo "*** is required on your system"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
861 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
862 echo "*** If you have an old version installed, it is best to remove it, although"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
863 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
864 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
865 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
866 echo "*** came with the system with the command"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
867 echo "***"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
868 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
869 [ echo "*** The test program failed to compile or link. See the file config.log for the"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
870 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
871 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
872 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
873 CFLAGS="$ac_save_CFLAGS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
874 LIBS="$ac_save_LIBS"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
875 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
876 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
877 GTK_CFLAGS=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
878 GTK_LIBS=""
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
879 ifelse([$3], , :, [$3])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
880 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
881 AC_SUBST(GTK_CFLAGS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
882 AC_SUBST(GTK_LIBS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
883 rm -f conf.gtktest
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
884 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
885
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
886 # Macro to add for using GNU gettext.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
887 # Ulrich Drepper <drepper@cygnus.com>, 1995.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
888 #
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
889 # This file can be copied and used freely without restrictions. It can
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
890 # be used in projects which are not available under the GNU General Public
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
891 # License or the GNU Library General Public License but which still want
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
892 # to provide support for the GNU gettext functionality.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
893 # Please note that the actual code of the GNU gettext library is covered
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
894 # by the GNU Library General Public License, and the rest of the GNU
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
895 # gettext package package is covered by the GNU General Public License.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
896 # They are *not* in the public domain.
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
897
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
898 # serial 10
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
899
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
900 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
901 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
902 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
903 dnl depending on --{enable,disable}-{shared,static} and on the presence of
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
904 dnl AM-DISABLE-SHARED). Otherwise, a static library
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
905 dnl $(top_builddir)/intl/libintl.a will be created.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
906 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
907 dnl implementations (in libc or libintl) without the ngettext() function
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
908 dnl will be ignored.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
909 dnl LIBDIR is used to find the intl libraries. If empty,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
910 dnl the value `$(top_builddir)/intl/' is used.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
911 dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
912 dnl The result of the configuration is one of three cases:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
913 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
914 dnl and used.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
915 dnl Catalog format: GNU --> install in $(datadir)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
916 dnl Catalog extension: .mo after installation, .gmo in source tree
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
917 dnl 2) GNU gettext has been found in the system's C library.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
918 dnl Catalog format: GNU --> install in $(datadir)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
919 dnl Catalog extension: .mo after installation, .gmo in source tree
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
920 dnl 3) No internationalization, always use English msgid.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
921 dnl Catalog format: none
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
922 dnl Catalog extension: none
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
923 dnl The use of .gmo is historical (it was needed to avoid overwriting the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
924 dnl GNU format catalogs when building on a platform with an X/Open gettext),
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
925 dnl but we keep it in order not to force irrelevant filename changes on the
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
926 dnl maintainers.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
927 dnl
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
928 AC_DEFUN([AM_WITH_NLS],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
929 [AC_MSG_CHECKING([whether NLS is requested])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
930 dnl Default is enabled NLS
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
931 AC_ARG_ENABLE(nls,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
932 [ --disable-nls do not use Native Language Support],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
933 USE_NLS=$enableval, USE_NLS=yes)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
934 AC_MSG_RESULT($USE_NLS)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
935 AC_SUBST(USE_NLS)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
936
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
937 BUILD_INCLUDED_LIBINTL=no
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
938 USE_INCLUDED_LIBINTL=no
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
939 INTLLIBS=
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
940
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
941 dnl If we use NLS figure out what method
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
942 if test "$USE_NLS" = "yes"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
943 AC_DEFINE(ENABLE_NLS, 1,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
944 [Define to 1 if translation of program messages to the user's native language
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
945 is requested.])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
946 AC_MSG_CHECKING([whether included gettext is requested])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
947 AC_ARG_WITH(included-gettext,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
948 [ --with-included-gettext use the GNU gettext library included here],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
949 nls_cv_force_use_gnu_gettext=$withval,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
950 nls_cv_force_use_gnu_gettext=no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
951 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
952
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
953 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
954 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
955 dnl User does not insist on using GNU NLS library. Figure out what
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
956 dnl to use. If GNU gettext is available we use this. Else we have
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
957 dnl to fall back to GNU NLS library.
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
958 CATOBJEXT=NONE
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
959
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
960 dnl Add a version number to the cache macros.
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
961 define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
962 define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
963
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
964 AC_CHECK_HEADER(libintl.h,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
965 [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
966 [AC_TRY_LINK([#include <libintl.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
967 extern int _nl_msg_cat_cntr;],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
968 [bindtextdomain ("", "");
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
969 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
970 gt_cv_func_gnugettext_libc=yes,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
971 gt_cv_func_gnugettext_libc=no)])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
972
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
973 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
974 AC_CACHE_CHECK([for GNU gettext in libintl],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
975 gt_cv_func_gnugettext_libintl,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
976 [gt_save_LIBS="$LIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
977 LIBS="$LIBS -lintl $LIBICONV"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
978 AC_TRY_LINK([#include <libintl.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
979 extern int _nl_msg_cat_cntr;],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
980 [bindtextdomain ("", "");
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
981 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
982 gt_cv_func_gnugettext_libintl=yes,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
983 gt_cv_func_gnugettext_libintl=no)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
984 LIBS="$gt_save_LIBS"])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
985 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
986
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
987 dnl If an already present or preinstalled GNU gettext() is found,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
988 dnl use it. But if this macro is used in GNU gettext, and GNU
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
989 dnl gettext is already preinstalled in libintl, we update this
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
990 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
991 if test "$gt_cv_func_gnugettext_libc" = "yes" \
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
992 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
993 && test "$PACKAGE" != gettext; }; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
994 AC_DEFINE(HAVE_GETTEXT, 1,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
995 [Define if the GNU gettext() function is already present or preinstalled.])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
996
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
997 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
998 dnl If iconv() is in a separate libiconv library, then anyone
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
999 dnl linking with libintl{.a,.so} also needs to link with
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1000 dnl libiconv.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1001 INTLLIBS="-lintl $LIBICONV"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1002 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1003
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1004 gt_save_LIBS="$LIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1005 LIBS="$LIBS $INTLLIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1006 AC_CHECK_FUNCS(dcgettext)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1007 LIBS="$gt_save_LIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1008
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1009 dnl Search for GNU msgfmt in the PATH.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1010 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1011 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1012 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1013
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1014 dnl Search for GNU xgettext in the PATH.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1015 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1016 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1017
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1018 CATOBJEXT=.gmo
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1019 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1020 ])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1021
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1022 if test "$CATOBJEXT" = "NONE"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1023 dnl GNU gettext is not found in the C library.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1024 dnl Fall back on GNU gettext library.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1025 nls_cv_use_gnu_gettext=yes
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1026 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1027 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1028
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1029 if test "$nls_cv_use_gnu_gettext" = "yes"; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1030 dnl Mark actions used to generate GNU NLS library.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1031 INTLOBJS="\$(GETTOBJS)"
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1032 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1033 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1034 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1035 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1036 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1037 AC_SUBST(MSGFMT)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1038 BUILD_INCLUDED_LIBINTL=yes
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1039 USE_INCLUDED_LIBINTL=yes
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1040 CATOBJEXT=.gmo
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1041 INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1042 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1043 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1044
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1045 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1046 dnl Test whether we really found GNU msgfmt.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1047 if test "$GMSGFMT" != ":"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1048 dnl If it is no GNU msgfmt we define it as : so that the
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1049 dnl Makefiles still can work.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1050 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1051 : ;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1052 else
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1053 AC_MSG_RESULT(
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1054 [found msgfmt program is not GNU msgfmt; ignore it])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1055 GMSGFMT=":"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1056 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1057 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1058
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1059 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1060 dnl Test whether we really found GNU xgettext.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1061 if test "$XGETTEXT" != ":"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1062 dnl If it is no GNU xgettext we define it as : so that the
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1063 dnl Makefiles still can work.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1064 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1065 : ;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1066 else
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1067 AC_MSG_RESULT(
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1068 [found xgettext program is not GNU xgettext; ignore it])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1069 XGETTEXT=":"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1070 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1071 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1072
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1073 dnl We need to process the po/ directory.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1074 POSUB=po
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1075 fi
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1076 AC_OUTPUT_COMMANDS(
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1077 [for ac_file in $CONFIG_FILES; do
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1078 # Support "outfile[:infile[:infile...]]"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1079 case "$ac_file" in
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1080 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1081 esac
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1082 # PO directories have a Makefile.in generated from Makefile.in.in.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1083 case "$ac_file" in */Makefile.in)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1084 # Adjust a relative srcdir.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1085 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1086 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1087 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1088 # In autoconf-2.13 it is called $ac_given_srcdir.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1089 # In autoconf-2.50 it is called $srcdir.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1090 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1091 case "$ac_given_srcdir" in
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1092 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1093 /*) top_srcdir="$ac_given_srcdir" ;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1094 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1095 esac
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1096 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1097 rm -f "$ac_dir/POTFILES"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1098 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1099 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1100 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1101 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1102 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1103 ;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1104 esac
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1105 done])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1106
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1107
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1108 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1109 dnl to 'yes' because some of the testsuite requires it.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1110 if test "$PACKAGE" = gettext; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1111 BUILD_INCLUDED_LIBINTL=yes
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1112 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1113
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1114 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1115 dnl because plural.y uses bison specific features. It requires at least
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1116 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1117 dnl compile.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1118 dnl bison is only needed for the maintainer (who touches plural.y). But in
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1119 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1120 dnl the rule in general Makefile. Now, some people carelessly touch the
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1121 dnl files or have a broken "make" program, hence the plural.c rule will
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1122 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1123 dnl present or too old.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1124 AC_CHECK_PROGS([INTLBISON], [bison])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1125 if test -z "$INTLBISON"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1126 ac_verc_fail=yes
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1127 else
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1128 dnl Found it, now check the version.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1129 AC_MSG_CHECKING([version of bison])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1130 changequote(<<,>>)dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1131 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1132 case $ac_prog_version in
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1133 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1134 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1135 changequote([,])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1136 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1137 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1138 esac
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1139 AC_MSG_RESULT([$ac_prog_version])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1140 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1141 if test $ac_verc_fail = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1142 INTLBISON=:
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1143 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1144
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1145 dnl These rules are solely for the distribution goal. While doing this
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1146 dnl we only have to keep exactly one list of the available catalogs
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1147 dnl in configure.in.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1148 for lang in $ALL_LINGUAS; do
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1149 GMOFILES="$GMOFILES $lang.gmo"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1150 POFILES="$POFILES $lang.po"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1151 done
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1152
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1153 dnl Make all variables we use known to autoconf.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1154 AC_SUBST(BUILD_INCLUDED_LIBINTL)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1155 AC_SUBST(USE_INCLUDED_LIBINTL)
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1156 AC_SUBST(CATALOGS)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1157 AC_SUBST(CATOBJEXT)
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1158 AC_SUBST(GMOFILES)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1159 AC_SUBST(INTLLIBS)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1160 AC_SUBST(INTLOBJS)
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1161 AC_SUBST(POFILES)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1162 AC_SUBST(POSUB)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1163
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1164 dnl For backward compatibility. Some configure.ins may be using this.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1165 nls_cv_header_intl=
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1166 nls_cv_header_libgt=
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1167
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1168 dnl For backward compatibility. Some Makefiles may be using this.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1169 DATADIRNAME=share
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1170 AC_SUBST(DATADIRNAME)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1171
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1172 dnl For backward compatibility. Some Makefiles may be using this.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1173 INSTOBJEXT=.mo
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1174 AC_SUBST(INSTOBJEXT)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1175
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1176 dnl For backward compatibility. Some Makefiles may be using this.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1177 GENCAT=gencat
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1178 AC_SUBST(GENCAT)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1179 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1180
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1181 dnl Usage: Just like AM_WITH_NLS, which see.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1182 AC_DEFUN([AM_GNU_GETTEXT],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1183 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1184 AC_REQUIRE([AC_PROG_CC])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1185 AC_REQUIRE([AC_CANONICAL_HOST])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1186 AC_REQUIRE([AC_PROG_RANLIB])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1187 AC_REQUIRE([AC_ISC_POSIX])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1188 AC_REQUIRE([AC_HEADER_STDC])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1189 AC_REQUIRE([AC_C_CONST])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1190 AC_REQUIRE([AC_C_INLINE])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1191 AC_REQUIRE([AC_TYPE_OFF_T])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1192 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1193 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1194 AC_REQUIRE([AC_FUNC_MMAP])dnl
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1195 AC_REQUIRE([jm_GLIBC21])dnl
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1196
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1197 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1198 stdlib.h string.h unistd.h sys/param.h])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1199 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1200 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1201 strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1202
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1203 AM_ICONV
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1204 AM_LANGINFO_CODESET
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1205 AM_LC_MESSAGES
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1206 AM_WITH_NLS([$1],[$2],[$3])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1207
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1208 if test "x$CATOBJEXT" != "x"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1209 if test "x$ALL_LINGUAS" = "x"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1210 LINGUAS=
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1211 else
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1212 AC_MSG_CHECKING(for catalogs to be installed)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1213 NEW_LINGUAS=
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1214 for presentlang in $ALL_LINGUAS; do
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1215 useit=no
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1216 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1217 # Use the presentlang catalog if desiredlang is
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1218 # a. equal to presentlang, or
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1219 # b. a variant of presentlang (because in this case,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1220 # presentlang can be used as a fallback for messages
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1221 # which are not translated in the desiredlang catalog).
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1222 case "$desiredlang" in
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1223 "$presentlang"*) useit=yes;;
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1224 esac
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1225 done
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1226 if test $useit = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1227 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1228 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1229 done
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1230 LINGUAS=$NEW_LINGUAS
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1231 AC_MSG_RESULT($LINGUAS)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1232 fi
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1233
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1234 dnl Construct list of names of catalog files to be constructed.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1235 if test -n "$LINGUAS"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1236 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1237 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1238 fi
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1239
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1240 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1241 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1242 dnl Try to locate is.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1243 MKINSTALLDIRS=
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1244 if test -n "$ac_aux_dir"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1245 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1246 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1247 if test -z "$MKINSTALLDIRS"; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1248 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1249 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1250 AC_SUBST(MKINSTALLDIRS)
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1251
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1252 dnl Enable libtool support if the surrounding package wishes it.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1253 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1254 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1255 ])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1256
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1257 # Search path for a program which passes the given test.
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1258 # Ulrich Drepper <drepper@cygnus.com>, 1996.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1259 #
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1260 # This file can be copied and used freely without restrictions. It can
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1261 # be used in projects which are not available under the GNU General Public
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1262 # License or the GNU Library General Public License but which still want
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1263 # to provide support for the GNU gettext functionality.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1264 # Please note that the actual code of the GNU gettext library is covered
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1265 # by the GNU Library General Public License, and the rest of the GNU
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1266 # gettext package package is covered by the GNU General Public License.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1267 # They are *not* in the public domain.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1268
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1269 # serial 2
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1270
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1271 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1272 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1273 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1274 [# Extract the first word of "$2", so it can be a program name with args.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1275 set dummy $2; ac_word=[$]2
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1276 AC_MSG_CHECKING([for $ac_word])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1277 AC_CACHE_VAL(ac_cv_path_$1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1278 [case "[$]$1" in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1279 /*)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1280 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1281 ;;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1282 *)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1284 for ac_dir in ifelse([$5], , $PATH, [$5]); do
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1285 test -z "$ac_dir" && ac_dir=.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1286 if test -f $ac_dir/$ac_word; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1287 if [$3]; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1288 ac_cv_path_$1="$ac_dir/$ac_word"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1289 break
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1290 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1291 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1292 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1293 IFS="$ac_save_ifs"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1294 dnl If no 4th arg is given, leave the cache variable unset,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1295 dnl so AC_PATH_PROGS will keep looking.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1296 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1297 ])dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1298 ;;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1299 esac])dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1300 $1="$ac_cv_path_$1"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1301 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1302 AC_MSG_RESULT([$]$1)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1303 else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1304 AC_MSG_RESULT(no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1305 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1306 AC_SUBST($1)dnl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1307 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1308
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1309 #serial 1
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1310 # This test replaces the one in autoconf.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1311 # Currently this macro should have the same name as the autoconf macro
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1312 # because gettext's gettext.m4 (distributed in the automake package)
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1313 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1314 # give these diagnostics:
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1315 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1316 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1317
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1318 undefine([AC_ISC_POSIX])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1319
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1320 AC_DEFUN([AC_ISC_POSIX],
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1321 [
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1322 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1323 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1324 ]
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1325 )
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 7
diff changeset
1326
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1327 #serial 2
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1328
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1329 # Test for the GNU C Library, version 2.1 or newer.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1330 # From Bruno Haible.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1331
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1332 AC_DEFUN([jm_GLIBC21],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1333 [
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1334 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1335 ac_cv_gnu_library_2_1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1336 [AC_EGREP_CPP([Lucky GNU user],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1337 [
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1338 #include <features.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1339 #ifdef __GNU_LIBRARY__
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1340 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1341 Lucky GNU user
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1342 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1343 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1344 ],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1345 ac_cv_gnu_library_2_1=yes,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1346 ac_cv_gnu_library_2_1=no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1347 ]
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1348 )
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1349 AC_SUBST(GLIBC21)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1350 GLIBC21="$ac_cv_gnu_library_2_1"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1351 ]
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1352 )
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1353
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1354 #serial AM2
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1355
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1356 dnl From Bruno Haible.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1357
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1358 AC_DEFUN([AM_ICONV],
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1359 [
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1360 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1361 dnl those with the standalone portable GNU libiconv installed).
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1362
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1363 AC_ARG_WITH([libiconv-prefix],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1364 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1365 for dir in `echo "$withval" | tr : ' '`; do
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1366 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1367 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1368 done
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1369 ])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1370
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1371 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1372 am_cv_func_iconv="no, consider installing GNU libiconv"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1373 am_cv_lib_iconv=no
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1374 AC_TRY_LINK([#include <stdlib.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1375 #include <iconv.h>],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1376 [iconv_t cd = iconv_open("","");
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1377 iconv(cd,NULL,NULL,NULL,NULL);
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1378 iconv_close(cd);],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1379 am_cv_func_iconv=yes)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1380 if test "$am_cv_func_iconv" != yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1381 am_save_LIBS="$LIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1382 LIBS="$LIBS -liconv"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1383 AC_TRY_LINK([#include <stdlib.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1384 #include <iconv.h>],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1385 [iconv_t cd = iconv_open("","");
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1386 iconv(cd,NULL,NULL,NULL,NULL);
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1387 iconv_close(cd);],
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1388 am_cv_lib_iconv=yes
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1389 am_cv_func_iconv=yes)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1390 LIBS="$am_save_LIBS"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1391 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1392 ])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1393 if test "$am_cv_func_iconv" = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1394 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1395 AC_MSG_CHECKING([for iconv declaration])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1396 AC_CACHE_VAL(am_cv_proto_iconv, [
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1397 AC_TRY_COMPILE([
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1398 #include <stdlib.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1399 #include <iconv.h>
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1400 extern
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1401 #ifdef __cplusplus
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1402 "C"
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1403 #endif
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1404 #if defined(__STDC__) || defined(__cplusplus)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1405 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1406 #else
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1407 size_t iconv();
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1408 #endif
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1409 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1410 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1411 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1412 AC_MSG_RESULT([$]{ac_t:-
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1413 }[$]am_cv_proto_iconv)
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1414 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1415 [Define as const if the declaration of iconv() needs const.])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1416 fi
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1417 LIBICONV=
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1418 if test "$am_cv_lib_iconv" = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1419 LIBICONV="-liconv"
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1420 fi
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1421 AC_SUBST(LIBICONV)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1422 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1423
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1424 #serial AM1
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1425
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1426 dnl From Bruno Haible.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1427
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1428 AC_DEFUN([AM_LANGINFO_CODESET],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1429 [
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1430 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1431 [AC_TRY_LINK([#include <langinfo.h>],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1432 [char* cs = nl_langinfo(CODESET);],
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1433 am_cv_langinfo_codeset=yes,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1434 am_cv_langinfo_codeset=no)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1435 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1436 if test $am_cv_langinfo_codeset = yes; then
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1437 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1438 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1439 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1440 ])
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1441
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1442 # Check whether LC_MESSAGES is available in <locale.h>.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1443 # Ulrich Drepper <drepper@cygnus.com>, 1995.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1444 #
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1445 # This file can be copied and used freely without restrictions. It can
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1446 # be used in projects which are not available under the GNU General Public
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1447 # License or the GNU Library General Public License but which still want
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1448 # to provide support for the GNU gettext functionality.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1449 # Please note that the actual code of the GNU gettext library is covered
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1450 # by the GNU Library General Public License, and the rest of the GNU
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1451 # gettext package package is covered by the GNU General Public License.
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1452 # They are *not* in the public domain.
7
5551ab2301fe * Fixed a DND crash
masneyb
parents: 1
diff changeset
1453
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1454 # serial 2
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1455
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1456 AC_DEFUN([AM_LC_MESSAGES],
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1457 [if test $ac_cv_header_locale_h = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1458 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1459 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1460 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1461 if test $am_cv_val_LC_MESSAGES = yes; then
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1462 AC_DEFINE(HAVE_LC_MESSAGES, 1,
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1463 [Define if your <locale.h> file defines LC_MESSAGES.])
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1464 fi
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1465 fi])
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1466