File: configure.in

package info (click to toggle)
minicom 2.2-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,220 kB
  • ctags: 1,151
  • sloc: ansic: 13,987; sh: 3,589; makefile: 130
file content (350 lines) | stat: -rw-r--r-- 8,700 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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
dnl $Id: configure.in,v 1.42 2006/10/11 20:51:43 al-guest Exp $
dnl configure.in autoconf/automake input script
dnl for minicom
dnl

AC_INIT([minicom], [2.2], [minicom-devel@lists.alioth.debian.org])
AC_CONFIG_SRCDIR([src/minicom.c])
AM_CONFIG_HEADER([config.h])
AC_PREREQ(2.59)

AM_INIT_AUTOMAKE([1.7])

dnl Checks for programs.
AC_PROG_CC

AC_AIX
AC_MINIX

AC_PROG_INSTALL
dnl AC_PROG_LIBTOOL
AC_PROG_RANLIB

AC_ISC_POSIX

AC_ARG_ENABLE([music],
	AS_HELP_STRING([--enable-music],
	               [Enable music for certain events (def: DISABLED)]),
	[], [enable_music="no"])
if test "x$enable_music" = xyes; then
	AC_DEFINE(VC_MUSIC, [1], [Music support is enabled])
fi

AC_ARG_ENABLE([socket],
	AS_HELP_STRING([--disable-socket],
	               [Disable socket support (def: enabled)]),
	[], [enable_socket="yes"])
if test "x$enable_socket" = xyes; then
	AC_DEFINE(USE_SOCKET, [1], [Socket support is enabled])
fi

AC_ARG_ENABLE([lock-dir],
	AS_HELP_STRING([--enable-lock-dir=DIR],
	               [Set com line lock directory (def: try common locations)]),
	[], [enable_lock_dir="yes"])
if test "x$enable_lock_dir" = xyes; then
	UUCPLOCK=""
else
	if test "x$enable_lock_dir" = xno; then
		AC_MSG_ERROR(Lock directory required)
	else
		UUCPLOCK="$enable_lock_dir"
	fi
fi

AC_ARG_ENABLE([dfl-port],
	AS_HELP_STRING([--enable-dfl-port=DEVFILE],
	               [Set default /dev/.. modem device (def: try common locations)]),
	[], [enable_dfl_port="yes"])
if test "x$enable_dfl_port" = xyes; then
	DFL_PORT=""
else
	if test "x$enable_dfl_port" = xno; then
		AC_MSG_ERROR(Default port required)
	else
		DFL_PORT="$enable_dfl_port"
	fi
fi

AC_ARG_ENABLE([dfl-baud],
	AS_HELP_STRING([--enable-dfl-baud=NNNNN],
	               [Set default baud rate (def: 115200)]),
	[], [enable_dfl_baud="yes"])
if test "x$enable_dfl_baud" = xyes; then
	DEF_BAUD="115200"
else
	if test "x$enable_dfl_baud" = xno; then
		AC_MSG_ERROR(Default baud rate required)
	else
		DEF_BAUD="$enable_dfl_baud"
	fi
fi

AC_ARG_ENABLE([cfg-dir],
	AS_HELP_STRING([--enable-cfg-dir=DIR],
	               [Set minicom cfg file path (def: sysconfdir)]),
	[], [enable_cfg_dir="yes"])
if test "x$enable_cfg_dir" = xyes; then
	MINICOM_CONFDIR="$sysconfdir"
else
	if test "x$enable_cfg_dir" = xno; then
		AC_MSG_ERROR(Config directory required)
	else
		MINICOM_CONFDIR="$enable_cfg_dir"
	fi
fi
AC_SUBST([MINICOM_CONFDIR])

AC_ARG_ENABLE([kermit],
	AS_HELP_STRING([--enable-kermit=FILE],
	               [Set default path to kermit (def: search PATH)]),
	[], [enable_kermit="yes"])
if test "x$enable_kermit" = xyes; then
	PATH_KERMIT=""
else
	if test "x$enable_kermit" = xno; then
		PATH_KERMIT=""
	else
		PATH_KERMIT="$enable_kermit"
	fi
fi

AC_ARG_ENABLE([dgux],
	AS_HELP_STRING([--enable-dgux],
	               [Enable DG/UX extensions (def: DISABLED)]))
if test "x$enable_dgux" = xyes; then
	AC_DEFINE(_DGUX_SOURCE, [1], [Define to enable DG/UX extensions])
fi

AC_ARG_ENABLE([hpux],
	AS_HELP_STRING([--enable-hpux],
	               [Enable HP/UX extensions (def: DISABLED)]))
if test "x$enable_hpux" = xyes; then
	AC_DEFINE(_HPUX_SOURCE, [1], [Define to enable HP/UX extensions])
fi

dnl Set of available languages.
ALL_LINGUAS="cs da de es fr fi hu ja no pl pt_BR ro ru rw sv vi zh_TW"

dnl Checks for programs.
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.14.1)

if test "x$enable_kermit" != xno && test "x$PATH_KERMIT" = x
then
AC_PATH_PROG(PATH_KERMIT, kermit, no, $PATH:/bin:/usr/bin:/usr/local/bin:/opt/gnu/bin)
else
	AC_MSG_CHECKING(manual Kermit setting)
	AC_MSG_RESULT($PATH_KERMIT)
fi
if test "x$PATH_KERMIT" = x -o "x$PATH_KERMIT" = xno
then
	AC_DEFINE(KERMIT, "", [Path to kermit])
else
	AC_DEFINE_UNQUOTED(KERMIT, "$PATH_KERMIT -l %l -b %b", [Kermit command])
fi


# Some GNU/Linux systems (e.g., SuSE 4.3, 1996) don't have curses, but
# rather ncurses.  So we check for it.
TERMLIBS=
for termlib in tinfo ncurses curses termcap terminfo termlib ; do
   AC_CHECK_LIB(${termlib}, tputs,
     [TERMLIBS="${TERMLIBS} -l${termlib}"; break])
done

LIBS="$LIBS $TERMLIBS"

dnl Checks for header files.
dnl Do not use <ncurses/termcap.h> unless we're linking with ncurses.
if test "x$termlib" = xncurses; then
  dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined.
  AC_CHECK_HEADERS(ncurses/termcap.h)
fi

AC_CHECK_LIB(socket, socket)

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_STAT
AC_HEADER_TIME

AC_SYS_POSIX_TERMIOS
AC_HEADER_TIOCGWINSZ
if test $ac_cv_sys_posix_termios = yes; then
  AC_DEFINE(POSIX_TERMIOS, [1], [Define if your system supports POSIX termios])
fi

AC_CHECK_HEADERS(stdarg.h varargs.h termcap.h termio.h termios.h \
	setjmp.h errno.h pwd.h signal.h fcntl.h sgtty.h locale.h \
	sys/ptem.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h \
	sys/ttold.h sys/param.h unistd.h posix1_lim.h sgtty.h features.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AM_C_PROTOTYPES
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_ERROR_AT_LINE
AC_FUNC_CLOSEDIR_VOID
AM_WITH_DMALLOC
AC_CHECK_FUNCS(getcwd getwd memmove strerror strstr vsnprintf vprintf select)
#KEYSERV="minicom.keyserv"
KEYSERV=""
AC_SUBST(KEYSERV)
AC_REPLACE_FUNCS(snprintf usleep getopt getopt_long)

dnl system capabilities
AC_SYS_LONG_FILE_NAMES

dnl ---------------------------------------------------------------

AC_MSG_CHECKING(for com line lock directory)

if test "x$UUCPLOCK" != x
then
	if test -d $UUCPLOCK
	then
		AC_MSG_RESULT($UUCPLOCK)
		AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK", [Lock directory])
	else
		UUCPLOCK=""
	fi
fi

if test "x$UUCPLOCK" = x
then
	for ac_uucplock in /etc/locks /var/lock /usr/spool/locks /var/spool/locks /var/spool/lock /usr/spool/uucp /var/spool/uucp; do
		UUCPLOCK=$ac_uucplock
		if test -d $UUCPLOCK; then
			AC_MSG_RESULT($UUCPLOCK)
			AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK")
			break
		else
			UUCPLOCK=""
		fi
	done
fi

if test "x$UUCPLOCK" = x
then
	AC_MSG_ERROR(No suitable lock directory)
fi

dnl ---------------------------------------------------------------

AC_MSG_CHECKING(for default serial port device)

if test "x$DFL_PORT" != x
then
	if test -c $DFL_PORT
	then
		AC_MSG_RESULT($DFL_PORT)
		AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT",
		                   [Default /dev/... device])
	else
		DFL_PORT=""
	fi
fi

if test "x$DFL_PORT" = x
then
	for ac_port in /dev/modem /dev/cua/b /dev/cua2p0 /dev/ttyS1 /dev/com0 /dev/tty01 /dev/tty8; do
		DFL_PORT=$ac_port
		if test -c $DFL_PORT; then
			AC_MSG_RESULT($DFL_PORT)
			AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT")
			break
		else
			DFL_PORT=""
		fi
	done
fi

if test "x$DFL_PORT" = x
then
	DFL_PORT=/dev/modem
	AC_MSG_RESULT($DFL_PORT)
	AC_DEFINE_UNQUOTED(DFL_PORT, "$DFL_PORT", [Default device])
fi

dnl ---------------------------------------------------------------

AC_MSG_CHECKING(for default baud rate)

tmp_match=no
for tmp_baud_rate in 300 1200 2400 4800 9600 19200 38400 57600 115200 230400
do
	if test "x$DEF_BAUD" = "x$tmp_baud_rate"
	then
		tmp_match=yes
		AC_DEFINE_UNQUOTED(DEF_BAUD, "$DEF_BAUD", [Default baud rate])
		AC_MSG_RESULT($DEF_BAUD)
	fi
done

if test "x$tmp_match" != xyes
then
	AC_MSG_ERROR(No suitable default baud rate)
fi

if test "x$ac_cv_header_getopt_h" = xno
then
	CFLAGS="$CFLAGS -I\$(top_srcdir)/lib"
fi

# this is a hack, if we need getopt_long we also need getopt
# but I don't know how to express that dependency in lib/Makefile.am
AC_SUBST(LIBPORT_GETOPT_LONG_DEP)
if test "x$ac_cv_func_getopt_long" = xno
then
	LIBPORT_GETOPT_LONG_DEP="getopt.o"
fi

dnl ---------------------------------------------------------------

AH_BOTTOM([
/* Defines from old config.h */
#define LOGFILE "minicom.log"        /* Not defined = not used */
#define CALLOUT ""                   /* Gets run to get into dialut mode */
#define CALLIN  ""                   /* Gets run to get into dial in mode */

/* This defines a special mode in the wwxgetch() routine. The
 * basic idea behind this probably works on the consoles of
 * most PC-based unices, but it's only implemented for Linux.
 */
#if defined (__linux__)
#  define KEY_KLUDGE 1
#endif

/* And this for the translation tables (vt100 -> ASCII) */
#if __STDC__
#  define TRANSLATE 1
#else
#  define TRANSLATE 0
#endif
])

dnl --------------------------------------------------------------

AC_CONFIG_FILES([Makefile
                 doc/Makefile \
                 extras/Makefile \
		 extras/linux/Makefile \
		 extras/tables/Makefile \
		 extras/termcap/Makefile \
		 extras/terminfo/Makefile \
		 man/Makefile \
		 lib/Makefile \
		 src/Makefile \
		 po/Makefile.in \
		 minicom.spec])
AC_OUTPUT