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 ****
16 [ --with-library build Wine as a library instead of an emulator],
17 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.a"],
18 [OPTIONS="" MAIN_TARGET="wine"])
21 [ --with-dll build Wine as a DLL instead of an emulator],
22 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.so.1.0"])
25 [ --with-ipc use inter-process communication for DDE],
26 [OPTIONS="$OPTIONS -DCONFIG_IPC"])
31 dnl **** Check for some programs and libraries ****
42 dnl Check for -li386 for NetBSD and OpenBSD
43 AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
45 dnl **** If ln -s doesn't work, use cp instead ****
46 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
48 dnl **** Check for gcc strength-reduce bug ****
50 if test "x${GCC}" = "xyes"
52 CFLAGS="$CFLAGS -Wall"
53 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
56 static int Array[[3]];
59 for(i=0; i<B; i++) Array[[i]] = i - 3;
60 exit( Array[[1]] != -2 );
62 ac_cv_c_gcc_strength_bug="no",
63 ac_cv_c_gcc_strength_bug="yes",
64 ac_cv_c_gcc_strength_bug="yes") )
65 if test "$ac_cv_c_gcc_strength_bug" = "yes"
67 CFLAGS="$CFLAGS -fno-strength-reduce"
71 dnl **** Check for underscore on external symbols ****
73 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
74 ac_cv_c_extern_prefix,
76 LIBS="conftest_asm.s $LIBS"
77 cat > conftest_asm.s <<EOF
82 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
83 ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
85 if test "$ac_cv_c_extern_prefix" = "yes"
87 AC_DEFINE(NEED_UNDERSCORE_PREFIX)
90 dnl **** Check for working dll ****
92 if test "$MAIN_TARGET" = "libwine.so.1.0"
94 AC_CACHE_CHECK("whether we can build a dll",
97 CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
98 AC_TRY_LINK(,[return 1],ac_cv_c_dll="yes",ac_cv_c_dll="no")
101 if test "$ac_cv_c_dll" = "yes"
103 CFLAGS="$CFLAGS -fPIC"
105 MAIN_TARGET="libwine.a"
109 dnl **** Check for functions and header files ****
111 AC_CHECK_FUNCS(memmove tcgetattr usleep wait4 waitpid)
116 dnl **** Generate output files ****
118 MAKE_RULES=Make.rules
119 AC_SUBST_FILE(MAKE_RULES)
126 documentation/Makefile
129 graphics/metafiledrv/Makefile
130 graphics/win16drv/Makefile
131 graphics/x11drv/Makefile
144 programs/progman/Makefile
145 programs/winhelp/Makefile
154 echo "Configure finished. Do 'make depend; make' to compile Wine."
158 dnl comment-start: "dnl "
160 dnl comment-start-skip: "\\bdnl\\b\\s *"
161 dnl compile-command: "autoconf"