Release 961208
[wine/multimedia.git] / configure.in
blob273f8422e18484e37e52217a0dc2806eb10515ad
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)
12 dnl **** Command-line arguments ****
14 AC_ARG_WITH(library,
15 [  --with-library          build Wine as a library instead of an emulator],
16 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.a"],
17 [OPTIONS="" MAIN_TARGET="wine"])
19 AC_ARG_WITH(dll,
20 [  --with-dll              build Wine as a DLL instead of an emulator],
21 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.so.1.0"])
23 AC_ARG_WITH(ipc,
24 [  --with-ipc              use inter-process communication for DDE],
25 [OPTIONS="$OPTIONS -DCONFIG_IPC"])
27 AC_SUBST(MAIN_TARGET)
28 AC_SUBST(OPTIONS)
30 dnl **** Check for some programs and libraries ****
32 AC_PROG_MAKE_SET
33 AC_PROG_CC
34 AC_PROG_CPP
35 AC_PATH_XTRA
36 AC_PROG_YACC
37 AC_PROG_LEX
38 AC_PROG_RANLIB
39 AC_PROG_INSTALL
40 dnl Check for -li386 for NetBSD
41 AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
43 dnl **** Check for gcc strength-reduce bug ****
45 if test "x${GCC}" = "xyes"
46 then
47   CFLAGS="$CFLAGS -Wall"
48   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
49                   AC_TRY_RUN([
50 int main(void) {
51   static int Array[[3]];
52   unsigned int B = 3;
53   int i;
54   for(i=0; i<B; i++) Array[[i]] = i - 3;
55   exit( Array[[1]] != -2 );
56 }],
57     ac_cv_c_gcc_strength_bug="no",
58     ac_cv_c_gcc_strength_bug="yes",
59     ac_cv_c_gcc_strength_bug="yes") )
60   if test "$ac_cv_c_gcc_strength_bug" = "yes"
61   then
62     CFLAGS="$CFLAGS -fno-strength-reduce"
63   fi
66 dnl **** Check for underscore on external symbols ****
68 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
69                ac_cv_c_extern_prefix,
70 [saved_libs=$LIBS
71 LIBS="conftest_asm.s $LIBS"
72 cat > conftest_asm.s <<EOF
73         .globl _ac_test
74 _ac_test:
75         .long 0
76 EOF
77 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
78             ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
79 LIBS=$saved_libs])
80 if test "$ac_cv_c_extern_prefix" = "yes"
81 then
82   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
85 dnl **** Check for working dll ****
87 if test "$MAIN_TARGET" = "libwine.so.1.0"
88 then
89   AC_CACHE_CHECK("whether we can build a dll",
90                  ac_cv_c_dll,
91   [saved_cflags=$CFLAGS
92   CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0"
93   AC_TRY_LINK(,[return 1],ac_cv_c_dll="yes",ac_cv_c_dll="no")
94   CFLAGS=$saved_cflags
95   ])
96   if test "$ac_cv_c_dll" = "yes"
97   then
98     CFLAGS="$CFLAGS -fPIC"
99   else
100     MAIN_TARGET="libwine.a"
101   fi
104 dnl **** Check for functions and header files ****
106 AC_CHECK_FUNCS(memmove tcgetattr usleep)
107 AC_HEADER_STAT()
108 AC_C_CONST()
109 AC_TYPE_SIZE_T()
111 dnl **** Generate output files ****
113 MAKE_RULES=Make.rules
114 AC_SUBST_FILE(MAKE_RULES)
116 AC_OUTPUT([
117 Make.rules
118 Makefile
119 controls/Makefile
120 debugger/Makefile
121 files/Makefile
122 graphics/Makefile
123 graphics/metafiledrv/Makefile
124 graphics/win16drv/Makefile
125 graphics/x11drv/Makefile
126 if1632/Makefile
127 ipc/Makefile
128 library/Makefile
129 libtest/Makefile
130 loader/Makefile
131 memory/Makefile
132 misc/Makefile
133 miscemu/Makefile
134 multimedia/Makefile
135 objects/Makefile
136 programs/Makefile
137 programs/progman/Makefile
138 programs/winhelp/Makefile
139 rc/Makefile
140 resources/Makefile
141 tools/Makefile
142 win32/Makefile
143 windows/Makefile ])
145 echo
146 echo "Configure finished.  Do 'make depend; make' to compile Wine."
147 echo
149 dnl Local Variables:
150 dnl comment-start: "dnl "
151 dnl comment-end: ""
152 dnl comment-start-skip: "\\bdnl\\b\\s *"
153 dnl compile-command: "autoconf"
154 dnl End: