Release 961201
[wine/multimedia.git] / configure.in
blob8e49105d0f56a1f0c97675e4d6ff64e944f5a84e
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 -DWINELIBDLL" MAIN_TARGET="libwine.so.1.0" CFLAGS="$CFLAGS -fPIC"])
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_C_CROSS
49   AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
50                   AC_TRY_RUN([
51 int main(void) {
52   static int Array[[3]];
53   unsigned int B = 3;
54   int i;
55   for(i=0; i<B; i++) Array[[i]] = i - 3;
56   exit( Array[[1]] != -2 );
57 }],
58     ac_cv_c_gcc_strength_bug="no",
59     ac_cv_c_gcc_strength_bug="yes",
60     ac_cv_c_gcc_strength_bug="yes") )
61   if test "$ac_cv_c_gcc_strength_bug" = "yes"
62   then
63     CFLAGS="$CFLAGS -fno-strength-reduce"
64   fi
67 dnl **** Check for underscore on external symbols ****
69 AC_CACHE_CHECK("whether external symbols need an underscore prefix",
70                ac_cv_c_extern_prefix,
71 [saved_libs=$LIBS
72 LIBS="conftest_asm.s $LIBS"
73 cat > conftest_asm.s <<EOF
74         .globl _ac_test
75 _ac_test:
76         .long 0
77 EOF
78 AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
79             ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
80 LIBS=$saved_libs])
81 if test "$ac_cv_c_extern_prefix" = "yes"
82 then
83   AC_DEFINE(NEED_UNDERSCORE_PREFIX)
86 dnl **** Check for functions and header files ****
88 AC_CHECK_FUNCS(memmove tcgetattr usleep)
89 AC_HEADER_STAT()
90 AC_C_CONST()
91 AC_TYPE_SIZE_T()
93 dnl **** Generate output files ****
95 MAKE_RULES=Make.rules
96 AC_SUBST_FILE(MAKE_RULES)
98 AC_OUTPUT([
99 Make.rules
100 Makefile
101 controls/Makefile
102 debugger/Makefile
103 files/Makefile
104 graphics/Makefile
105 graphics/metafiledrv/Makefile
106 graphics/win16drv/Makefile
107 graphics/x11drv/Makefile
108 if1632/Makefile
109 ipc/Makefile
110 library/Makefile
111 libtest/Makefile
112 loader/Makefile
113 memory/Makefile
114 misc/Makefile
115 miscemu/Makefile
116 multimedia/Makefile
117 objects/Makefile
118 programs/Makefile
119 programs/progman/Makefile
120 programs/winhelp/Makefile
121 rc/Makefile
122 resources/Makefile
123 tools/Makefile
124 win32/Makefile
125 windows/Makefile ])
127 echo
128 echo "Configure finished.  Do 'make depend; make' to compile Wine."
129 echo
131 dnl Local Variables:
132 dnl comment-start: "dnl "
133 dnl comment-end: ""
134 dnl comment-start-skip: "\\bdnl\\b\\s *"
135 dnl compile-command: "autoconf"
136 dnl End: