1 dnl Process this file with autoconf to produce a configure script.
2 dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
3 dnl <patra@itp1.physik.tu-berlin.de>
4 AC_REVISION([configure.in 1.00])
5 AC_INIT(controls/edit.c)
6 AC_CONFIG_HEADER(include/config.h)
7 AC_CONFIG_AUX_DIR(tools)
9 # We want these before the checks, so the checks can modify their values.
10 test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
11 test -z "$PROGEXT" && PROGEXT="" AC_SUBST(PROGEXT)
13 dnl **** Command-line arguments ****
19 AC_ARG_ENABLE(emulator,
20 [ --disable-emulator build only the Wine library, not the emulator],
21 [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
24 [ --enable-dll build the Wine library as a DLL],
25 [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
28 [ --enable-ipc use inter-process communication for DDE],
29 [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi])
35 dnl **** Check for some programs and libraries ****
46 dnl Check for -li386 for NetBSD and OpenBSD
47 AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
49 dnl **** If ln -s doesn't work, use cp instead ****
50 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
52 dnl **** Check for gcc strength-reduce bug ****
54 if test "x${GCC}" = "xyes"
56 CFLAGS="$CFLAGS -Wall"
57 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
60 static int Array[[3]];
63 for(i=0; i<B; i++) Array[[i]] = i - 3;
64 exit( Array[[1]] != -2 );
66 ac_cv_c_gcc_strength_bug="no",
67 ac_cv_c_gcc_strength_bug="yes",
68 ac_cv_c_gcc_strength_bug="yes") )
69 if test "$ac_cv_c_gcc_strength_bug" = "yes"
71 CFLAGS="$CFLAGS -fno-strength-reduce"
75 dnl **** Check for underscore on external symbols ****
77 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
78 ac_cv_c_extern_prefix,
80 LIBS="conftest_asm.s $LIBS"
81 cat > conftest_asm.s <<EOF
86 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
87 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
89 if test "$ac_cv_c_extern_prefix" = "yes"
91 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
94 dnl **** Check for working dll ****
97 if test "$LIB_TARGET" = "libwine.so.1.0"
99 AC_CACHE_CHECK("whether we can build a dll",
101 [saved_cflags=$CFLAGS
102 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
103 AC_TRY_LINK(,[return 1],ac_cv_c_dll="yes",ac_cv_c_dll="no")
106 if test "$ac_cv_c_dll" = "yes"
110 LIB_TARGET="libwine.a"
115 dnl **** Check for functions and header files ****
117 AC_CHECK_FUNCS(memmove strerror tcgetattr usleep wait4 waitpid)
122 dnl **** Generate output files ****
124 MAKE_RULES=Make.rules
125 AC_SUBST_FILE(MAKE_RULES)
132 documentation/Makefile
135 graphics/metafiledrv/Makefile
136 graphics/win16drv/Makefile
137 graphics/x11drv/Makefile
151 programs/notepad/Makefile
152 programs/progman/Makefile
153 programs/winhelp/Makefile
154 programs/winver/Makefile
164 echo "Configure finished. Do 'make depend; make' to compile Wine."
168 dnl comment-start: "dnl "
170 dnl comment-start-skip: "\\bdnl\\b\\s *"
171 dnl compile-command: "autoconf"