2 dnl Process this file with autoconf to produce a configure script.
5 dnl Set the package version
6 dnl Don't forget to update the PACKAGE, VERSION and BUILDINFO macros in
7 dnl dmake/win95/microsft/config.h to keep the native Microsoft C++
8 dnl compiler build happy.
13 AC_CONFIG_SRCDIR(man/dmake.tf)
17 dnl Use this instead of AC_PROG_.. version
20 AC_CONFIG_HEADER(config.h)
24 [ --enable-dbug: Enable build with dbug macros.
28 [ --enable-spawn: Enables the use of spawn instead of fork/exec
31 dnl Checks for programs.
38 dnl Checks for utilities.
42 AC_MSG_CHECKING([the operating system])
46 if test `echo $_os | $AWK -F_ '{ print $1 }'` = "CYGWIN"; then
47 if test "$GCC" = "yes"; then
48 if test `$CC -dumpmachine | $AWK -F- '{ print $3 }'` = "mingw32"; then
59 ## At the moment all except mingw builds are OS_TYPE unix
62 ## The following allows like systems to share settings this is not meant to
63 ## Imply that these OS are the same thing.
67 CASE_INSENSITIVE_FS=true
77 CASE_INSENSITIVE_FS=true
82 BUILDINFO="Windows / MinGW"
83 CASE_INSENSITIVE_FS=true
88 BUILDINFO="Windows / MS Visual C++"
89 CASE_INSENSITIVE_FS=true
93 # MacOSX is not garuanteed to be case insensitive, assume it's case
94 # sensitive, see issue 73661 for details.
118 AC_MSG_ERROR([$_os operating system is not suitable to build dmake!])
122 AC_MSG_RESULT([checked ($_os)])
124 dnl Set OS dependent settings
125 AM_CONDITIONAL(OSTYPEUNIX, test x$OS_TYPE = xunix)
126 AM_CONDITIONAL(OSTYPEWIN32, test x$OS_TYPE = xwinnt)
130 AC_DEFINE_UNQUOTED(BUILDINFO, "$BUILDINFO", [Build info string])
132 if test x$CASE_INSENSITIVE_FS = xtrue; then
133 dnl Mac OSX with HFS+ and Windows FS are case insensitive (although case
135 AC_DEFINE(CASE_INSENSITIVE_FS, 1, [Assume case insensitive file system.])
138 dnl =============================================
140 dnl =============================================
141 AC_MSG_CHECKING([whether to do a build with dbug macros])
142 if test -n "$enable_dbug" && test "$enable_dbug" != "no"; then
144 CPPFLAGS="$CPPFLAGS -DDBUG=1 -I\$(top_srcdir)/dbug/dbug"
150 AM_CONDITIONAL(DBUG, test -n "$DBUG")
152 dnl =============================================
154 dnl =============================================
155 AC_MSG_CHECKING([if spawn shall be used])
156 if test -n "$enable_spawn" && test "$enable_spawn" != "no"; then
157 AC_DEFINE(ENABLE_SPAWN, 1, [Enables the use of spawn instead of fork/exec if it is supported.])
163 dnl Predefine the DMAKEROOT macro for unix targets.
164 eval dmakerootprefix="$datarootdir"
165 # $datadir is ${prefix}/share if not overridden
166 test "x$dmakerootprefix" != "x${dmakerootprefix##NONE}" && dmakerootprefix=${ac_default_prefix}/share
168 if test x$OS_TYPE = xunix; then
169 DMAKEROOT_H_LINE1='"DMAKEROOT := '${dmakerootprefix}'/startup",'
171 AC_SUBST(DMAKEROOT_H_LINE1)
173 dnl List (all possible) *.in files
174 AC_CONFIG_FILES(dmakeroot.h Makefile startup/config.mk \
175 startup/Makefile startup/unix/Makefile \
176 startup/unix/linux/Makefile startup/unix/solaris/Makefile \
177 startup/unix/macosx/Makefile startup/unix/sysvr4/Makefile \
178 startup/unix/cygwin/Makefile \
179 startup/unix/os2/Makefile \
180 startup/winnt/Makefile startup/winnt/mingw/Makefile \
181 startup/winnt/msvc6/Makefile \
184 dnl Checks for libraries.
186 dnl Initialize libtool
189 dnl Checks for header files.
192 AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/types.h sys/stat.h unistd.h errno.h utime.h spawn.h wait.h sys/wait.h sys/time.h)
194 dnl Checks for typedefs, structures, and compiler characteristics.
199 AC_CHECK_TYPES(uint8)
200 AC_CHECK_TYPES(int16)
201 AC_CHECK_TYPES(uint16)
202 AC_CHECK_TYPES(int32)
203 AC_CHECK_TYPES(uint32)
205 AC_CHECK_SIZEOF(short, 2)
206 AC_CHECK_SIZEOF(int, 4)
207 AC_CHECK_SIZEOF(long, 4)
209 dnl Checks for library functions.
214 AC_CHECK_FUNCS(getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv)
215 # Usefull, but special to newlib/MSVC
216 AC_CHECK_FUNCS(strlwr)
218 dnl *** output to disk ***