Newer
Older
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.
dnl **** Command-line arguments ****
AC_ARG_WITH(library,
[ --with-library build Wine as a library instead of an emulator],
[OPTIONS="-DWINELIB" MAIN_TARGET="libwine.a"],
[OPTIONS="" MAIN_TARGET="wine"])
AC_ARG_WITH(dll,
[ --with-dll build Wine as a DLL instead of an emulator],
[OPTIONS="-DWINELIB -DWINELIBDLL" MAIN_TARGET="libwine.so.1.0" CFLAGS="$CFLAGS -fPIC"])
AC_ARG_WITH(ipc,
[ --with-ipc use inter-process communication for DDE],
dnl Check for -li386 for NetBSD
AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
dnl **** Check for gcc strength-reduce bug ****
if test "x${GCC}" = "xyes"
then
CFLAGS="$CFLAGS -Wall"
AC_C_CROSS
AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
AC_TRY_RUN([
int main(void) {
for(i=0; i<B; i++) Array[[i]] = i - 3;
exit( Array[[1]] != -2 );
}],
ac_cv_c_gcc_strength_bug="no",
ac_cv_c_gcc_strength_bug="yes",
ac_cv_c_gcc_strength_bug="yes") )
if test "$ac_cv_c_gcc_strength_bug" = "yes"
then
CFLAGS="$CFLAGS -fno-strength-reduce"
fi
fi
dnl **** Check for underscore on external symbols ****
AC_CACHE_CHECK("whether external symbols need an underscore prefix",
ac_cv_c_extern_prefix,
[saved_libs=$LIBS
LIBS="conftest_asm.s $LIBS"
cat > conftest_asm.s <<EOF
.globl _ac_test
_ac_test:
.long 0
EOF
AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
LIBS=$saved_libs])
if test "$ac_cv_c_extern_prefix" = "yes"
then
AC_DEFINE(NEED_UNDERSCORE_PREFIX)
fi
AC_HEADER_STAT()
AC_C_CONST()
AC_TYPE_SIZE_T()
AC_OUTPUT([
Make.rules
Makefile
controls/Makefile
debugger/Makefile
graphics/win16drv/Makefile
graphics/x11drv/Makefile
if1632/Makefile
ipc/Makefile
library/Makefile
libtest/Makefile
loader/Makefile
memory/Makefile
misc/Makefile
miscemu/Makefile
multimedia/Makefile
objects/Makefile
rc/Makefile
resources/Makefile
tools/Makefile
win32/Makefile
windows/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 *"