Release 971012
[wine/multimedia.git] / configure.in
blob9e97d28a102e2f76f0ed8bb006709f809e9fdf62
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 AC_ARG_WITH(library,
16 [  --with-library          build Wine as a library instead of an emulator],
17 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.a"],
18 [OPTIONS="" MAIN_TARGET="wine"])
20 AC_ARG_WITH(dll,
21 [  --with-dll              build Wine as a DLL instead of an emulator],
22 [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.so.1.0"])
24 AC_ARG_WITH(ipc,
25 [  --with-ipc              use inter-process communication for DDE],
26 [OPTIONS="$OPTIONS -DCONFIG_IPC"])
28 AC_SUBST(MAIN_TARGET)
29 AC_SUBST(OPTIONS)
31 dnl **** Check for some programs and libraries ****
33 AC_PROG_MAKE_SET
34 AC_PROG_CC
35 AC_PROG_CPP
36 AC_PATH_XTRA
37 AC_PROG_YACC
38 AC_PROG_LEX
39 AC_PROG_RANLIB
40 AC_PROG_INSTALL
41 AC_PROG_LN_S
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"
51 then
52   CFLAGS="$CFLAGS -Wall"
53   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
54                   AC_TRY_RUN([
55 int main(void) {
56   static int Array[[3]];
57   unsigned int B = 3;
58   int i;
59   for(i=0; i<B; i++) Array[[i]] = i - 3;
60   exit( Array[[1]] != -2 );
61 }],
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"
66   then
67     CFLAGS="$CFLAGS -fno-strength-reduce"
68   fi
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,
75 [saved_libs=$LIBS
76 LIBS="conftest_asm.s $LIBS"
77 cat > conftest_asm.s <<EOF
78         .globl _ac_test
79 _ac_test:
80         .long 0
81 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")
84 LIBS=$saved_libs])
85 if test "$ac_cv_c_extern_prefix" = "yes"
86 then
87   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
90 dnl **** Check for working dll ****
92 if test "$MAIN_TARGET" = "libwine.so.1.0"
93 then
94   AC_CACHE_CHECK("whether we can build a dll",
95                  ac_cv_c_dll,
96   [saved_cflags=$CFLAGS
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")
99   CFLAGS=$saved_cflags
100   ])
101   if test "$ac_cv_c_dll" = "yes"
102   then
103     CFLAGS="$CFLAGS -fPIC"
104   else
105     MAIN_TARGET="libwine.a"
106   fi
109 dnl **** Check for functions and header files ****
111 AC_CHECK_FUNCS(memmove tcgetattr usleep wait4 waitpid)
112 AC_HEADER_STAT()
113 AC_C_CONST()
114 AC_TYPE_SIZE_T()
116 dnl **** Generate output files ****
118 MAKE_RULES=Make.rules
119 AC_SUBST_FILE(MAKE_RULES)
121 AC_OUTPUT([
122 Make.rules
123 Makefile
124 controls/Makefile
125 debugger/Makefile
126 documentation/Makefile
127 files/Makefile
128 graphics/Makefile
129 graphics/metafiledrv/Makefile
130 graphics/win16drv/Makefile
131 graphics/x11drv/Makefile
132 if1632/Makefile
133 ipc/Makefile
134 library/Makefile
135 libtest/Makefile
136 loader/Makefile
137 memory/Makefile
138 misc/Makefile
139 miscemu/Makefile
140 msdos/Makefile
141 multimedia/Makefile
142 objects/Makefile
143 programs/Makefile
144 programs/progman/Makefile
145 programs/winhelp/Makefile
146 rc/Makefile
147 resources/Makefile
148 scheduler/Makefile
149 tools/Makefile
150 win32/Makefile
151 windows/Makefile ])
153 echo
154 echo "Configure finished.  Do 'make depend; make' to compile Wine."
155 echo
157 dnl Local Variables:
158 dnl comment-start: "dnl "
159 dnl comment-end: ""
160 dnl comment-start-skip: "\\bdnl\\b\\s *"
161 dnl compile-command: "autoconf"
162 dnl End: