-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure.in
86 lines (76 loc) · 2.17 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(libieee1284, 0.2.11)
AC_CONFIG_SRCDIR(libieee1284.spec.in)
AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects 1.6])
AC_PREREQ(2.53)
AM_CONFIG_HEADER(include/config.h)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
dnl Checks for libraries.
dnl Checks for header files.
AC_CHECK_HEADERS(sys/io.h)
dnl Checks for typedefs, structures, and compiler characteristics.
solaris_io=false
case "{$host}" in
*-*-linux*)
AC_DEFINE(HAVE_LINUX,1,enable ppdev access)
;;
*86-*-openbsd*)
AC_DEFINE(HAVE_OBSD_I386,1,enable OpenBSD i386 ioperm access)
LIBS="-li386"
;;
*86-*-freebsd* | *86-*-kfreebsd*)
AC_DEFINE(HAVE_FBSD_I386,1,enable FreeBSD /dev/io access)
;;
*86-*-netbsd*)
AC_DEFINE(HAVE_NBSD_I386,1,enable NetBSD i386 ioperm access)
;;
*86-*-solaris*)
AC_DEFINE(HAVE_SOLARIS,1,enable solaris iop access)
solaris_io=true
;;
*-*-cygwin* | *-*-mingw*)
windows_h_found=false
AC_CHECK_HEADERS([windows.h] [w32api/windows.h], [
windows_h_found=true
break
])
AS_VAR_IF(windows_h_found, [false], [
AC_MSG_ERROR(windows.h not found)
])
AC_DEFINE(HAVE_CYGWIN_9X,1,enable win95 access)
AC_DEFINE(HAVE_CYGWIN_NT,1,enable w32api access)
;;
*)
AC_MSG_ERROR(Sorry. $host is not supported yet)
;;
esac
AM_CONDITIONAL(SOLARIS_IO, test x$solaris_io = xtrue)
AC_ARG_WITH([python],
AC_HELP_STRING([--with-python],
[build python bindings]),
[ac_cv_use_python=$withval], [ac_cv_use_python=yes])
AC_CACHE_CHECK([whether to build python bindings],
[ac_cv_use_python], [ac_cv_use_python=yes])
AM_CONDITIONAL(PYTHON, test x$ac_cv_use_python = xyes)
if test $ac_cv_use_python = yes; then
AM_PATH_PYTHON
fi
AC_CHECK_TYPE([ssize_t],,,[#include <sys/types.h>])
if test $ac_cv_type_ssize_t != yes; then
AC_CHECK_TYPE([SSIZE_T],
AC_SUBST([SSIZE_T_IN_BASETSD_H], 1),
AC_MSG_ERROR([No definition of ssize_t found.]),
[#include <basetsd.h>])
else
AC_SUBST([SSIZE_T_IN_BASETSD_H], 0)
fi
dnl Checks for library functions.
AC_CONFIG_FILES([Makefile libieee1284.spec libieee1284.pc include/ieee1284.h])
AC_OUTPUT