File: configure.in

package info (click to toggle)
python-expect 1.0.5-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 320 kB
  • ctags: 122
  • sloc: ansic: 1,206; sh: 468; python: 157; makefile: 58
file content (61 lines) | stat: -rw-r--r-- 1,532 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
AC_INIT

AM_INIT_AUTOMAKE(expect, 0.1.0)
AM_CONFIG_HEADER(config.h)
AM_ACLOCAL_INCLUDE(macros)

AM_PATH_PYTHON
AM_INIT_PYEXEC_MOD

dnl check for headers
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_PROG_INSTALL
AC_CHECK_HEADERS(fcntl.h sys/fcntl.h sys/ioctl.h sys/time.h unistd.h sys/errno.h sys/wait.h)
AC_CHECK_HEADERS(string.h strings.h stdlib.h stdio.h termios.h sys/select.h select.h sys/stat.h)
AC_CHECK_HEADERS(sys/ioctl.h ioctl.h termios.h sys/termios.h sys/timeb.h types.h sys/types.h grp.h)

AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_PID_T

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strerror getcwd re_comp regcomp strdup strspn strstr strcspn)
AC_CHECK_FUNCS(strchr strrchr memmove memcpy memset memchr memcmp)
AC_CHECK_FUNCS(strcasecmp strncasecmp strftime alloca tcgetattr setsid setpgrp tcsetpgrp)

have_forkpty=no
FORKPTY_LIB=
AC_CHECK_FUNCS(forkpty, have_forkpty=yes)
for lib in bsd util; do
    got_lib=no
    if test $have_forkpty = no ; then
	AC_CHECK_LIB($lib, forkpty, [
	    if test x$got_lib = xno ; then
		FORKPTY_LIB="-l$lib"
	    fi
	    have_forkpty=yes
	    got_lib=yes
	    AC_DEFINE(HAVE_FORKPTY)
	    ])
    fi
done
AC_SUBST(FORKPTY_LIB)

dnl check for `struct winsize'
AC_MSG_CHECKING(for struct winsize)
AC_TRY_COMPILE([#include "all-headers.h"], [struct winsize w; ioctl(0, 1234, &w); ], [
ioctl_get_winsize_works=yes], [
ioctl_get_winsize_works=no
])
if test x$ioctl_get_winsize_works = xno; then
AC_DEFINE(NEED_WINSIZE)
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi

AC_OUTPUT(Makefile)