grub2: bring back build of aros-side grub2 tools
[AROS.git] / tools / MetaMake / configure.in
blob4af8859ae403b0ee72982a419dcc5792554872a2
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(MetaMake,0.6)
3 AC_REVISION($Revision$)dnl
4 AC_PREREQ(2.61)
5 AC_CONFIG_AUX_DIR(.)
6 AC_CONFIG_SRCDIR(mmake.c)
8 dnl Find out our host
9 AC_CANONICAL_HOST
11 if test "$host_os" = "mingw32" ; then
12     PWDCMD="pwd -W"
15 #don't know where else to put this...
16 AC_MSG_CHECKING([Building MetaMake in .. ])
17 METAMAKE_BUILDDIR=`${PWDCMD-pwd}`
18 AC_MSG_RESULT($METAMAKE_BUILDDIR)
20 AC_MSG_CHECKING([MetaMake Source in .. ])
21 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
22 METAMAKE_SRCDIR=${srcpwd}
23 AC_MSG_RESULT($METAMAKE_SRCDIR)
25 dnl Checks for programs.
26 AC_PROG_CC
27 AC_PROG_INSTALL
28 AC_PROG_MKDIR_P
30 dnl Checks for libraries.
32 dnl Checks for header files.
33 AC_HEADER_DIRENT
34 AC_HEADER_STDC
35 AC_CHECK_HEADERS(stdarg.h string.h unistd.h sys/stat.h sys/types.h netinet/in.h)
37 AC_MSG_CHECKING([where to build objfiles])
38 AC_ARG_WITH(objfiledir,AC_HELP_STRING([--with-objfiledir=DIR],[Build Object Files in DIR]),with_objfiles="$withval",with_objfiles="sourcedir")
39 if test "$with_objfiles" = "sourcedir"; then
40     mmake_srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
41     mmake_objdir="${mmake_srcpwd}/obj"
42 else
43     mmake_objdir="$with_objfiles"
45 AC_MSG_RESULT($with_objfiles)
47 dnl Checks for typedefs, structures, and compiler characteristics.
48 AC_C_CONST
49 AC_TYPE_SIZE_T
51 dnl Checks for library functions.
52 AC_FUNC_VPRINTF
53 AC_CHECK_FUNCS(getcwd strdup strndup strerror)
55 AC_SUBST(host_os)
56 AC_SUBST(mmake_objdir)
57 AC_SUBST(METAMAKE_BUILDDIR)
58 AC_SUBST(METAMAKE_SRCDIR)
60 AM_CONFIG_HEADER(config.h)
61 AC_OUTPUT(Makefile)