Release 971221
[wine/multimedia.git] / configure.in
blob11b26ab7b54bc7cd46588c520db87182bf4175c7
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 ****
15 dnl Default values
16 MAIN_TARGET=emu
17 LIB_TARGET=libwine.a
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])
23 AC_ARG_ENABLE(dll,
24 [  --enable-dll            build the Wine library as a DLL],
25 [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
27 AC_ARG_WITH(ipc,
28 [  --enable-ipc            use inter-process communication for DDE],
29 [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi])
31 AC_SUBST(MAIN_TARGET)
32 AC_SUBST(LIB_TARGET)
33 AC_SUBST(OPTIONS)
35 dnl **** Check for some programs and libraries ****
37 AC_PROG_MAKE_SET
38 AC_PROG_CC
39 AC_PROG_CPP
40 AC_PATH_XTRA
41 AC_PROG_YACC
42 AC_PROG_LEX
43 AC_PROG_RANLIB
44 AC_PROG_INSTALL
45 AC_PROG_LN_S
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"
55 then
56   CFLAGS="$CFLAGS -Wall"
57   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
58                   AC_TRY_RUN([
59 int main(void) {
60   static int Array[[3]];
61   unsigned int B = 3;
62   int i;
63   for(i=0; i<B; i++) Array[[i]] = i - 3;
64   exit( Array[[1]] != -2 );
65 }],
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"
70   then
71     CFLAGS="$CFLAGS -fno-strength-reduce"
72   fi
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,
79 [saved_libs=$LIBS
80 LIBS="conftest_asm.s $LIBS"
81 cat > conftest_asm.s <<EOF
82         .globl _ac_test
83 _ac_test:
84         .long 0
85 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")
88 LIBS=$saved_libs])
89 if test "$ac_cv_c_extern_prefix" = "yes"
90 then
91   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
94 dnl **** Check for working dll ****
96 DLLFLAGS=""
97 if test "$LIB_TARGET" = "libwine.so.1.0"
98 then
99   AC_CACHE_CHECK("whether we can build a dll",
100                  ac_cv_c_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")
104   CFLAGS=$saved_cflags
105   ])
106   if test "$ac_cv_c_dll" = "yes"
107   then
108     DLLFLAGS="-fPIC"
109   else
110     LIB_TARGET="libwine.a"
111   fi
113 AC_SUBST(DLLFLAGS)
115 dnl **** Check for functions and header files ****
117 AC_CHECK_FUNCS(memmove strerror tcgetattr usleep wait4 waitpid)
118 AC_HEADER_STAT()
119 AC_C_CONST()
120 AC_TYPE_SIZE_T()
122 dnl **** Generate output files ****
124 MAKE_RULES=Make.rules
125 AC_SUBST_FILE(MAKE_RULES)
127 AC_OUTPUT([
128 Make.rules
129 Makefile
130 controls/Makefile
131 debugger/Makefile
132 documentation/Makefile
133 files/Makefile
134 graphics/Makefile
135 graphics/metafiledrv/Makefile
136 graphics/win16drv/Makefile
137 graphics/x11drv/Makefile
138 if1632/Makefile
139 ipc/Makefile
140 library/Makefile
141 libtest/Makefile
142 loader/Makefile
143 memory/Makefile
144 misc/Makefile
145 miscemu/Makefile
146 msdos/Makefile
147 multimedia/Makefile
148 objects/Makefile
149 ole/Makefile
150 programs/Makefile
151 programs/notepad/Makefile
152 programs/progman/Makefile
153 programs/winhelp/Makefile
154 programs/winver/Makefile
155 rc/Makefile
156 relay32/Makefile
157 resources/Makefile
158 scheduler/Makefile
159 tools/Makefile
160 win32/Makefile
161 windows/Makefile ])
163 echo
164 echo "Configure finished.  Do 'make depend; make' to compile Wine."
165 echo
167 dnl Local Variables:
168 dnl comment-start: "dnl "
169 dnl comment-end: ""
170 dnl comment-start-skip: "\\bdnl\\b\\s *"
171 dnl compile-command: "autoconf"
172 dnl End: