blob: 5154cd76b7f7b5dc727485a75bec1e18bc3d4407 [file] [log] [blame]
dnl Process this file with autoconf to produce a configure script.
dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
dnl <patra@itp1.physik.tu-berlin.de>
AC_REVISION([configure.in 1.00])
AC_INIT(controls/edit.c)
# We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS="-g -O2 -Wall" AC_SUBST(CFLAGS)
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
dnl **** Command-line arguments ****
AC_ARG_WITH(library,
[ --with-library build Wine as a library instead of an emulator],
[AC_DEFINE(WINELIB) MAIN_TARGET="winelib.a"],[MAIN_TARGET="wine"])
AC_SUBST(MAIN_TARGET)
AC_ARG_WITH(language,
[ --with-language=LANG change the default language (LANG=En/De/No/Es)],
[LANG="-ALANG\($withval\)"],
[LANG="-ALANG\(En\)"],)
AC_SUBST(LANG)
AC_ARG_WITH(ipc,
[ --with-ipc use inter-process communication for DDE],
[AC_DEFINE(CONFIG_IPC)])
AC_ARG_WITH(malloc-debug,
[ --with-malloc-debug enable malloc() debugging],
[AC_DEFINE(MALLOC_DEBUGGING)])
dnl **** Check for some programs ****
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PATH_XTRA
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_RANLIB
AC_CHECK_FUNCS(tcgetattr)
AC_CHECK_HEADERS(stdlib.h)
AC_HEADER_STAT()
AC_C_CONST()
AC_TYPE_SIZE_T()
if test -z "${top_srcdir}"; then
TOP_SRCDIR="."
else
TOP_SRCDIR="${top_srcdir}"
fi
AC_MSG_CHECKING(for wine.ini in autoconf.h)
if test -f ${TOP_SRCDIR}/autoconf.h; then
if test `grep -c WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h` -ne 0; then
WINE_INI_GLOBAL=`grep WINE_INI_GLOBAL ${TOP_SRCDIR}/autoconf.h | tr ' ' '\n' | tail -1`
AC_MSG_RESULT(${WINE_INI_GLOBAL})
fi
fi
if test -z "${WINE_INI_GLOBAL}"; then
AC_MSG_RESULT(no)
fi
if test -z "${WINE_INI_GLOBAL}"; then
AC_MSG_CHECKING(for /usr/local/etc/wine.conf)
if test -f /usr/local/etc/wine.conf; then
AC_MSG_RESULT(yes)
WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
else
AC_MSG_RESULT(no)
WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
fi
fi
AC_SUBST(WINE_INI_GLOBAL)
AC_DEFINE_UNQUOTED(WINE_INI_GLOBAL,$WINE_INI_GLOBAL)
MAKE_RULES=$TOP_SRCDIR/Make.rules
AC_SUBST_FILE(MAKE_RULES)
AC_OUTPUT(Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile)
echo
echo "Configure finished. Do 'make depend; make' to compile Wine."
echo
dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl compile-command: "make configure config.h.in"
dnl End: