File: configure.in

package info (click to toggle)
ndtpd 2.3.6-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,688 kB
  • ctags: 3,377
  • sloc: ansic: 24,078; sh: 7,530; perl: 1,335; makefile: 646
file content (237 lines) | stat: -rw-r--r-- 5,452 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
dnl *
dnl * Process this file with autoconf to produce a configure script.
dnl *
AC_INIT(ndtpd/ndtpd.c)
AC_PREREQ(2.12)
AM_INIT_AUTOMAKE(ndtpd, 2.3.6)

dnl *
dnl * Set mailing address.
dnl *
MAILING_ADDRESS='m-kasahr@sra.co.jp'
AC_SUBST(MAILING_ADDRESS)
AC_DEFINE_UNQUOTED(MAILING_ADDRESS, "$MAILING_ADDRESS")

dnl *
dnl * --enable-ja-doc option.
dnl *
AC_ARG_ENABLE(ja-doc,
[  --enable-ja-doc         install Japanese documents [default=yes]],
[case "${enableval}" in
   yes)	ja_doc=true ;;
   no)	ja_doc=false ;;
   *)	AC_MSG_ERROR(bad value for --enable-ja-doc) ;;
esac], ja_doc=true)
AM_CONDITIONAL(ENABLE_JA_DOC, test ${ja_doc} = true)

dnl *
dnl * --with-logdir option.
dnl *
AC_ARG_WITH(logdir,
[  --with-logdir=DIR       syslog files that ndtpdaily rotates by default
                          are placed on DIR
                          [default=LOCALSTATEDIR/ndtpd/log]],
[logdir="${withval}"], [logdir='$(localstatedir)/ndtpd/log'])
AC_SUBST(logdir)

dnl *
dnl * --with-eb option.
dnl *
AC_ARG_WITH(eb,
[  --with-eb               use installed EB library [default=no]],
[case "${withval}" in
   yes|no) with_eb=${withval}
           with_zlib=${withval} ;;
   *)   AC_MSG_ERROR(invalid argument to --with-eb) ;;
esac], with_eb=no)
AM_CONDITIONAL(WITH_EB, test ${with_eb} = yes)

dnl *
dnl * --with-eb-includes option.
dnl *
AC_ARG_WITH(eb-includes,
[  --with-eb-includes=DIR  EB include files are in DIR],
[ebincludedir="${withval}"], [ebincludedir=''])

dnl *
dnl * --with-eb-libraries option.
dnl *
AC_ARG_WITH(eb-libraries,
[  --with-eb-libraries=DIR EB library files are in DIR],
[eblibdir="${withval}"], [eblibdir=''])

if test ${with_eb} = yes ; then
   if test "X${ebincludedir}" != X ; then
      INCLUDES_FOR_LIBEB="-I${ebincludedir}"
   else
      INCLUDES_FOR_LIBEB=''
   fi
   if test "X${eblibdir}" != X ; then
      LDADD_FOR_LIBEB="-L${eblibdir} -leb"
      DEPENDENCIES_FOR_LIBEB=''
   else
      LDADD_FOR_LIBEB="-leb"
      DEPENDENCIES_FOR_LIBEB=''
   fi
else
   INCLUDES_FOR_LIBEB='-I$(top_srcdir)/eb'
   LDADD_FOR_LIBEB='$(top_builddir)/eb/eb/libeb.la'
   DEPENDENCIES_FOR_LIBEB='$(top_builddir)/eb/eb/libeb.la'
fi
AC_SUBST(INCLUDES_FOR_LIBEB)
AC_SUBST(LDADD_FOR_LIBEB)
AC_SUBST(DEPENDENCIES_FOR_LIBEB)

dnl *
dnl * --with-zlib option.
dnl *
AC_ARG_WITH(zlib,
[  --with-zlib             use installed zlib [default=no]],
[case "${withval}" in
   yes|no) with_zlib=${withval} ;;
   *)   AC_MSG_ERROR(invalid argument to --with-zlib) ;;
esac], with_zlib=no)
AM_CONDITIONAL(WITH_ZLIB, test ${with_zlib} = yes)

dnl *
dnl * --with-zlib-includes option.
dnl *
AC_ARG_WITH(zlib-includes,
[  --with-zlib-includes=DIR
                          zlib include files are in DIR],
[zincludedir="${withval}"], [zincludedir=''])

dnl *
dnl * --with-zlib-libraries option.
dnl *
AC_ARG_WITH(zlib-libraries,
[  --with-zlib-libraries=DIR
                          zlib library files are in DIR],
[zlibdir="${withval}"], [zlibdir=''])

if test ${with_zlib} = yes ; then
   if test "X${zincludedir}" != X ; then
      INCLUDES_FOR_LIBZ="-I${zincludedir}"
   else
      INCLUDES_FOR_LIBZ=''
   fi
   if test "X${zlibdir}" != X ; then
      LDADD_FOR_LIBZ="-L${zlibdir} -lz"
      DEPENDENCIES_FOR_LIBZ=''
   else
      LDADD_FOR_LIBZ="-lz"
      DEPENDENCIES_FOR_LIBZ=''
   fi
else
   INCLUDES_FOR_LIBZ='-I$(top_srcdir)/eb/zlib'
   LDADD_FOR_LIBZ='$(top_builddir)/eb/zlib/libz.la'
   DEPENDENCIES_FOR_LIBZ='$(top_builddir)/eb/zlib/libz.la'
fi
AC_SUBST(INCLUDES_FOR_LIBZ)
AC_SUBST(LDADD_FOR_LIBZ)
AC_SUBST(DEPENDENCIES_FOR_LIBZ)

dnl * 
dnl * Subdirectories.
dnl *
AC_CONFIG_SUBDIRS(eb)

dnl * 
dnl * Alternative Programs.
dnl * 
AM_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S

AC_PATH_PROG(PERL, perl, no)
if test "$PERL" = no ; then
   AC_MSG_WARN(perl not found)
   PERL=/usr/bin/perl
fi

AC_PATH_PROGS(MAILX, Mail mailx, no, $PATH /usr/sbin)
if test "$MAILX" = no ; then
   AC_MSG_WARN(neither Mail nor mailx found)
   MAILX=true
fi

#AC_PATH_PROG(COMPRESS, compress, no)
#if test "$COMPRESS" = no ; then
#   AC_MSG_ERROR(compress not found)
#   exit 1
#fi

AC_PATH_PROG(GZIPCMD, gzip, no)
AC_PATH_PROG(BZIP2, bzip2, no)

dnl *
dnl * UNIX Variants
dnl *
AC_AIX
AC_MINIX

dnl * 
dnl * Compiler Characteristics.
dnl * 
AC_C_CONST

dnl * 
dnl * Libraries.
dnl * 
AC_CHECK_LIB(resolv, res_query)
if test "$ac_cv_lib_resolv_res_query" = no ; then
    AC_CHECK_LIB(bind, res_query)
fi
AC_CHECK_LIB(nsl, gethostname)
AC_CHECK_LIB(socket, socket)

dnl * 
dnl * Library Functions.
dnl * 
AC_FUNC_VPRINTF
AC_FUNC_GETPGRP
AC_FUNC_SETPGRP
AC_CHECK_FUNCS(getcwd getdtablesize getrlimit killpg memcpy psignal \
	setsid sigsetjmp sigsetmask sigprocmask strchr sysconf strsignal \
	syslog utime vsyslog waitpid wait3)
AC_REPLACE_FUNCS(memchr memmove memset strcasecmp strerror strtol)

dnl * 
dnl * Header Files.
dnl * 
AC_DECL_SYS_SIGLIST
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h memory.h stdlib.h string.h \
	sys/time.h sys/wait.h syslog.h unistd.h utime.h)

dnl * 
dnl * Structures.
dnl * 
AC_HEADER_TIME
AC_HEADER_STAT
AX_UNION_WAIT
AX_HAVE_STRUCT_UTIMBUF

dnl * 
dnl * Typedefs.
dnl * 
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_MODE_T
AC_CHECK_TYPE(ssize_t, int)

AC_TYPE_SIGNAL
if test "$ac_cv_type_signal" = void; then
   AC_DEFINE(RETSIGTYPE_VOID)
fi

dnl * 
dnl * Output Files.
dnl * 
AM_CONFIG_HEADER(config.h)

AC_OUTPUT(Makefile lib/Makefile ndtpd/Makefile doc/Makefile doc-ja/Makefile)