2 AC_CONFIG_HEADER(config.h)
9 if test "$prefix" = NONE
23 CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common"
24 LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g"
26 CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
27 LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
30 AC_ARG_WITH(defformat,[ --with-defformat Specify default format (ibm-3740)],
31 [DEFFORMAT="$withval"], [DEFFORMAT="ibm-3740"])
32 AC_ARG_WITH(libdsk, [ --with-libdsk Specify path to libdsk library],
33 [LIBDSK="$withval"], [LIBDSK=""])
34 AC_ARG_WITH(dmalloc, [ --with-dmalloc Specify path to dmalloc library],
35 [DMALLOC="$withval"], [DMALLOC=""])
39 dnl Choose between posix and win32 drivers...
42 if test "$CYGWIN" = "yes"
46 if test "$MINGW32" = "yes"
52 dnl Check for curses. If not found, don't build fsed.cpm
53 dnl Try both curses and ncurses
54 AC_CHECK_LIB(curses, printw, FSED_CPM=fsed.cpm LIBS="-lcurses $LIBS", FSED_CPM=)
55 if test x"$FSED_CPM" = x""; then
56 AC_CHECK_LIB(ncurses, printw, FSED_CPM=fsed.cpm LIBS="-lncurses $LIBS", FSED_CPM=)
59 dnl If using libdsk, check it's available.
60 if test "$LIBDSK" != ""; then
62 CPPFLAGS="$CPPFLAGS -I$LIBDSK/include"
63 CFLAGS="$CFLAGS -I$LIBDSK/include"
64 LDFLAGS="$LDFLAGS -L$LIBDSK/lib"
65 AC_CHECK_LIB(dsk, dsk_open)
66 AC_CHECK_HEADERS(libdsk.h, ,[echo "No libdsk.h - aborting"; exit 1])
69 dnl If using win32, check it's available.
70 if test x"$DEVICE" = x"win32"; then
71 AC_CHECK_HEADERS(windows.h winioctl.h, ,[echo "Windows headers not found - aborting"; exit 1] )
75 if test x"$DMALLOC" != x""; then
76 CPPFLAGS = "-I$DMALLOC/include $CPPFLAGS"
77 CFLAGS = "-I$DMALLOC/include $CFLAGS"
78 LDFLAGS = "-L$DMALLOC/lib $LDFLAGS"
79 AC_CHECK_LIB(dmalloc, malloc)
80 AC_CHECK_HEADERS(dmalloc.h)
84 dnl Checks for header files.
86 AC_CHECK_HEADERS(fcntl.h sys/types.h sys/stat.h limits.h unistd.h)
88 dnl Checks for typedefs, structures, and compiler characteristics.
98 dnl add EXE extension to fsed.cpm
99 if test x"$FSED_CPM" != x""; then
100 FSED_CPM="$FSED_CPM$EXEEXT"
103 dnl Checks for library functions.
106 AC_CHECK_FUNCS(mktime strerror)
111 eval DATADIR=$datadir
117 AC_OUTPUT(Makefile cpm.5 cpmchattr.1 cpmchmod.1 cpmcp.1 cpmls.1 cpmrm.1 fsck.cpm.1 fsed.cpm.1 mkfs.cpm.1 )