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