Release 960521
[wine/multimedia.git] / configure.in
blob55a417cf8912b81bbad8a34b8b81f6b312b0fe45
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_AUX_DIR(tools)
8 # We want these before the checks, so the checks can modify their values.
9 test -z "$CFLAGS" && CFLAGS="-g -O2" AC_SUBST(CFLAGS)
10 test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
11 test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
13 dnl **** Command-line arguments ****
15 AC_ARG_WITH(library,
16 [  --with-library          build Wine as a library instead of an emulator],
17 [AC_DEFINE(WINELIB) MAIN_TARGET="libwine.a"],[MAIN_TARGET="wine"])
19 AC_ARG_WITH(dll,
20 [  --with-dll              build Wine as a DLL instead of an emulator],
21 [AC_DEFINE(WINELIB) AC_DEFINE(WINELIBDLL)
22  MAIN_TARGET="libwine.so.1.0" CFLAGS="$CFLAGS -fPIC"])
23 AC_SUBST(MAIN_TARGET)
25 AC_ARG_WITH(ipc,
26 [  --with-ipc              use inter-process communication for DDE],
27 [AC_DEFINE(CONFIG_IPC)])
29 AC_ARG_WITH(malloc-debug,
30 [  --with-malloc-debug     enable malloc() debugging],
31 [AC_DEFINE(MALLOC_DEBUGGING)])
33 dnl **** Check for some programs and libraries ****
35 AC_PROG_MAKE_SET
36 AC_PROG_CC
37 AC_PROG_CPP
38 AC_PATH_XTRA
39 AC_PROG_YACC
40 AC_PROG_LEX
41 AC_PROG_RANLIB
42 AC_PROG_INSTALL
43 dnl Check for -li386 for NetBSD
44 AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
46 dnl **** Check for gcc strength-reduce bug ****
48 if test "x${GCC}" = "xyes"
49 then
50   CFLAGS="$CFLAGS -Wall"
51   AC_C_CROSS
52   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
53                   AC_TRY_RUN([
54 int main(void) {
55   static int Array[[3]];
56   unsigned int B = 3;
57   int i;
58   for(i=0; i<B; i++) Array[[i]] = i - 3;
59   exit( Array[[1]] != -2 );
60 }],
61     ac_cv_c_gcc_strength_bug="no",
62     ac_cv_c_gcc_strength_bug="yes",
63     ac_cv_c_gcc_strength_bug="yes") )
64   if test "$ac_cv_c_gcc_strength_bug" = "yes"
65   then
66     CFLAGS="$CFLAGS -fno-strength-reduce"
67   fi
70 dnl **** Check for functions and header files ****
72 AC_CHECK_FUNCS(tcgetattr usleep)
73 AC_CHECK_HEADERS(stdlib.h)
74 AC_HEADER_STAT()
75 AC_C_CONST()
76 AC_TYPE_SIZE_T()
78 dnl **** Generate output files ****
80 MAKE_RULES=Make.rules
81 AC_SUBST_FILE(MAKE_RULES)
83 AC_OUTPUT([
84 Make.rules
85 Makefile
86 controls/Makefile
87 debugger/Makefile
88 debugger/readline/Makefile
89 files/Makefile
90 if1632/Makefile
91 ipc/Makefile
92 library/Makefile
93 libtest/Makefile
94 loader/Makefile
95 memory/Makefile
96 misc/Makefile
97 miscemu/Makefile
98 multimedia/Makefile
99 objects/Makefile
100 programs/Makefile
101 programs/progman/Makefile
102 programs/winhelp/Makefile
103 rc/Makefile
104 resources/Makefile
105 tools/Makefile
106 win32/Makefile
107 windows/Makefile ])
109 echo
110 echo "Configure finished.  Do 'make depend; make' to compile Wine."
111 echo
113 dnl Local Variables:
114 dnl comment-start: "dnl "
115 dnl comment-end: ""
116 dnl comment-start-skip: "\\bdnl\\b\\s *"
117 dnl compile-command: "autoconf"
118 dnl End: