2 AC_CONFIG_HEADER(config.h)
9 if test "$prefix" = NONE
29 CFLAGS="${CFLAGS} ${PIPE}-Wmissing-prototypes -Wstrict-prototypes -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -pedantic -fno-common"
33 AC_ARG_WITH(defformat,[ --with-defformat Specify default format (ibm-3740)],
34 [DEFFORMAT="$withval"], [DEFFORMAT="ibm-3740"])
35 AC_ARG_WITH(libdsk, [ --with-libdsk Specify path to libdsk library],
36 [LIBDSK="$withval"], [LIBDSK=""])
37 AC_ARG_WITH(dmalloc, [ --with-dmalloc Specify path to dmalloc library],
38 [DMALLOC="$withval"], [DMALLOC=""])
42 dnl Choose between posix and win32 drivers...
45 if test "$CYGWIN" = "yes"
49 if test "$MINGW32" = "yes"
55 dnl Check for curses. If not found, don't build fsed.cpm
56 dnl Try both curses and ncurses
57 AC_CHECK_LIB(curses, printw, FSED_CPM=fsed.cpm LIBS="-lcurses $LIBS", FSED_CPM=)
58 if test x"$FSED_CPM" = x""; then
59 AC_CHECK_LIB(ncurses, printw, FSED_CPM=fsed.cpm LIBS="-lncurses $LIBS", FSED_CPM=)
62 dnl If using libdsk, check it's available.
63 if test "$LIBDSK" != ""; then
65 CPPFLAGS="$CPPFLAGS -I$LIBDSK/include"
66 CFLAGS="$CFLAGS -I$LIBDSK/include"
67 LDFLAGS="$LDFLAGS -L$LIBDSK/lib"
68 AC_CHECK_LIB(dsk, dsk_open)
69 AC_CHECK_HEADERS(libdsk.h, ,[echo "No libdsk.h - aborting"; exit 1])
72 dnl If using win32, check it's available.
73 if test x"$DEVICE" = x"win32"; then
74 AC_CHECK_HEADERS(windows.h winioctl.h, ,[echo "Windows headers not found - aborting"; exit 1] )
78 if test x"$DMALLOC" != x""; then
79 CPPFLAGS = "-I$DMALLOC/include $CPPFLAGS"
80 CFLAGS = "-I$DMALLOC/include $CFLAGS"
81 LDFLAGS = "-L$DMALLOC/lib $LDFLAGS"
82 AC_CHECK_LIB(dmalloc, malloc)
83 AC_CHECK_HEADERS(dmalloc.h)
87 dnl Checks for header files.
89 AC_CHECK_HEADERS(fcntl.h sys/types.h sys/stat.h limits.h unistd.h)
91 dnl Checks for typedefs, structures, and compiler characteristics.
101 dnl add EXE extension to fsed.cpm
102 if test x"$FSED_CPM" != x""; then
103 FSED_CPM="$FSED_CPM$EXEEXT"
106 dnl Checks for library functions.
109 AC_CHECK_FUNCS(mktime strerror)
114 eval DATADIR=$datadir
120 AC_OUTPUT(Makefile cpm.5 cpmchattr.1 cpmchmod.1 cpmcp.1 cpmls.1 cpmrm.1 fsck.cpm.1 fsed.cpm.1 mkfs.cpm.1 )