-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
131 lines (119 loc) · 3.28 KB
/
configure.ac
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
dnl Process this file with autoconf to produce a configure script.
UPDATED='August 21, 2019'
AC_INIT(LibDsk, 1.5.12)
AC_CONFIG_SRCDIR(lib/dskopen.c)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(m4)
AC_CANONICAL_SYSTEM
LT_INIT
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([foreign])
dnl Support for the Java Native Interface bindings
AC_ARG_WITH(jni,
[ --with-jni Include Java Native Interface bindings [default=no]],
, with_jni=no)
dnl Support for transparent zlib compression
AC_ARG_WITH(zlib,
[ --with-zlib Include support for gz-compressed files [default=yes]],
, with_zlib=yes)
dnl Support for transparent bzlib compression
AC_ARG_WITH(bzlib,
[ --with-bzlib Include support for bz2-compressed files [default=yes]],
, with_bzlib=yes)
dnl Enable / disable machine-specific "floppy" driver
AC_ARG_ENABLE(floppy,
[ --enable-floppy Enable host floppy driver [default=yes]],
, enable_floppy=yes)
AC_JAVA_OPTIONS
if test x$enable_floppy = xyes; then
:
else
CFLAGS="$CFLAGS -DDISABLE_FLOPPY"
fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Obsoleted by LIBTOOL AC_PROG_RANLIB
AC_PROG_MAKE_SET
AM_PROG_LIBTOOL
dnl GCC extra options
dnl Disable DLL export functions, because gcc 2.95.2 crashes
dnl trying to compile with them present.
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="-Wall -DNOTWINDLL $CFLAGS"
fi
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h limits.h sys/ioctl.h stat.h sys/stat.h sys/types.h)
AC_CHECK_HEADERS(unistd.h termios.h libgen.h assert.h)
AC_CHECK_HEADERS(dirent.h fcntl.h utime.h pwd.h time.h dir.h direct.h)
AC_CHECK_HEADERS(linux/fd.h linux/fdreg.h sys/sysmacros.h shlobj.h)
if test "$host_os" != "cygwin"; then
AC_CHECK_HEADERS([windows.h winioctl.h], [], [],
[[#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
]])
fi
dnl Checks for functions
AC_CHECK_FUNCS(strcmpi stricmp strcasecmp, break)
AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(basename)
AC_CHECK_FUNCS(fork)
AC_CHECK_FUNCS(GetTempFileName)
AC_CHECK_FUNCS(sleep)
AC_CHECK_FUNCS(ftruncate)
AC_CHECK_FUNCS(chsize)
dnl Checks for zlib
if test x$with_zlib = xyes; then
AC_CHECK_HEADERS(zlib.h)
AC_CHECK_LIB(z, zlibVersion)
fi
dnl Checks for bzlib
if test x$with_bzlib = xyes; then
AC_CHECK_HEADERS(bzlib.h)
AC_CHECK_LIB(bz2, BZ2_bzlibVersion)
fi
dnl Checks for Java bits
if test x$with_jni = xyes; then
JAVA=java
JAVAC=javac
AC_CHECK_CLASSPATH
AC_PROG_JAVAC
AC_PROG_JAVA
AC_PROG_JAVAH
AC_PROG_JAVADOC
AC_PROG_JAR
AC_JNI_INCLUDE_DIR
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
done
AC_CHECK_HEADERS(jni.h)
LIBDSKJAR=libdsk.jar
TOOLCLASSES="DskFormat.class DskID.class DskTrans.class"
else
LIBDSKJAR=
TOOLCLASSES=
JAVAH=true
JAVAC=true
JAVA=true
JAVADOC=true
JAR=true
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_EXEEXT
AC_OBJEXT
dnl Pass path for the 'share' directory
CPPFLAGS="$CPPFLAGS -DAUTOSHARE=${datadir}/LibDsk"
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_HEADER_MAJOR
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(strerror)
AC_SUBST(LIBDSKJAR)
AC_SUBST(TOOLCLASSES)
AC_SUBST(CLASSPATH)
AC_OUTPUT(libdsk.pc Makefile doc/Makefile include/Makefile lib/Makefile tools/Makefile man/Makefile)