Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 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) |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 6 | AC_CONFIG_HEADER(include/config.h) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 7 | AC_CONFIG_AUX_DIR(tools) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 8 | |
| 9 | # We want these before the checks, so the checks can modify their values. |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 10 | test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS) |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 11 | test -z "$PROGEXT" && PROGEXT="" AC_SUBST(PROGEXT) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 12 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 13 | dnl **** Command-line arguments **** |
| 14 | |
| 15 | AC_ARG_WITH(library, |
| 16 | [ --with-library build Wine as a library instead of an emulator], |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 17 | [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.a"], |
| 18 | [OPTIONS="" MAIN_TARGET="wine"]) |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 19 | |
| 20 | AC_ARG_WITH(dll, |
| 21 | [ --with-dll build Wine as a DLL instead of an emulator], |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 22 | [OPTIONS="-DWINELIB" MAIN_TARGET="libwine.so.1.0"]) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 24 | AC_ARG_WITH(ipc, |
| 25 | [ --with-ipc use inter-process communication for DDE], |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 26 | [OPTIONS="$OPTIONS -DCONFIG_IPC"]) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 27 | |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 28 | AC_SUBST(MAIN_TARGET) |
| 29 | AC_SUBST(OPTIONS) |
Alexandre Julliard | b7258be | 1995-09-01 15:57:28 +0000 | [diff] [blame] | 30 | |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 31 | dnl **** Check for some programs and libraries **** |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 32 | |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 33 | AC_PROG_MAKE_SET |
| 34 | AC_PROG_CC |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 35 | AC_PROG_CPP |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 36 | AC_PATH_XTRA |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 37 | AC_PROG_YACC |
| 38 | AC_PROG_LEX |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 39 | AC_PROG_RANLIB |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 40 | AC_PROG_INSTALL |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame^] | 41 | dnl Check for -li386 for NetBSD and OpenBSD |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 42 | AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386") |
| 43 | |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 44 | dnl **** Check for gcc strength-reduce bug **** |
| 45 | |
| 46 | if test "x${GCC}" = "xyes" |
| 47 | then |
| 48 | CFLAGS="$CFLAGS -Wall" |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 49 | AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug, |
| 50 | AC_TRY_RUN([ |
| 51 | int main(void) { |
Alexandre Julliard | d2e1c1a | 1996-03-09 16:12:43 +0000 | [diff] [blame] | 52 | static int Array[[3]]; |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 53 | unsigned int B = 3; |
| 54 | int i; |
Alexandre Julliard | d2e1c1a | 1996-03-09 16:12:43 +0000 | [diff] [blame] | 55 | for(i=0; i<B; i++) Array[[i]] = i - 3; |
| 56 | exit( Array[[1]] != -2 ); |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 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 |
| 65 | fi |
| 66 | |
Alexandre Julliard | 8cc3a5e | 1996-08-11 15:49:51 +0000 | [diff] [blame] | 67 | dnl **** Check for underscore on external symbols **** |
| 68 | |
| 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) |
| 84 | fi |
| 85 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 86 | dnl **** Check for working dll **** |
| 87 | |
| 88 | if test "$MAIN_TARGET" = "libwine.so.1.0" |
| 89 | then |
| 90 | AC_CACHE_CHECK("whether we can build a dll", |
| 91 | ac_cv_c_dll, |
| 92 | [saved_cflags=$CFLAGS |
| 93 | CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0" |
| 94 | AC_TRY_LINK(,[return 1],ac_cv_c_dll="yes",ac_cv_c_dll="no") |
| 95 | CFLAGS=$saved_cflags |
| 96 | ]) |
| 97 | if test "$ac_cv_c_dll" = "yes" |
| 98 | then |
| 99 | CFLAGS="$CFLAGS -fPIC" |
| 100 | else |
| 101 | MAIN_TARGET="libwine.a" |
| 102 | fi |
| 103 | fi |
| 104 | |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 105 | dnl **** Check for functions and header files **** |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 106 | |
Alexandre Julliard | 2197901 | 1997-03-05 08:22:35 +0000 | [diff] [blame] | 107 | AC_CHECK_FUNCS(memmove tcgetattr usleep wait4 waitpid) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 108 | AC_HEADER_STAT() |
| 109 | AC_C_CONST() |
| 110 | AC_TYPE_SIZE_T() |
| 111 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 112 | dnl **** Generate output files **** |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 113 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 114 | MAKE_RULES=Make.rules |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 115 | AC_SUBST_FILE(MAKE_RULES) |
| 116 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 117 | AC_OUTPUT([ |
| 118 | Make.rules |
| 119 | Makefile |
| 120 | controls/Makefile |
| 121 | debugger/Makefile |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame^] | 122 | documentation/Makefile |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 123 | files/Makefile |
Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 124 | graphics/Makefile |
Alexandre Julliard | bf9130a | 1996-10-13 17:45:47 +0000 | [diff] [blame] | 125 | graphics/metafiledrv/Makefile |
Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 126 | graphics/win16drv/Makefile |
| 127 | graphics/x11drv/Makefile |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 128 | if1632/Makefile |
| 129 | ipc/Makefile |
| 130 | library/Makefile |
| 131 | libtest/Makefile |
| 132 | loader/Makefile |
| 133 | memory/Makefile |
| 134 | misc/Makefile |
| 135 | miscemu/Makefile |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 136 | msdos/Makefile |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 137 | multimedia/Makefile |
| 138 | objects/Makefile |
Alexandre Julliard | 02ed4c2 | 1996-03-02 19:34:10 +0000 | [diff] [blame] | 139 | programs/Makefile |
| 140 | programs/progman/Makefile |
Alexandre Julliard | 1285c2f | 1996-05-06 16:06:24 +0000 | [diff] [blame] | 141 | programs/winhelp/Makefile |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 142 | rc/Makefile |
| 143 | resources/Makefile |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 144 | scheduler/Makefile |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 145 | tools/Makefile |
| 146 | win32/Makefile |
| 147 | windows/Makefile ]) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 148 | |
| 149 | echo |
| 150 | echo "Configure finished. Do 'make depend; make' to compile Wine." |
| 151 | echo |
| 152 | |
| 153 | dnl Local Variables: |
| 154 | dnl comment-start: "dnl " |
| 155 | dnl comment-end: "" |
| 156 | dnl comment-start-skip: "\\bdnl\\b\\s *" |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 157 | dnl compile-command: "autoconf" |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 158 | dnl End: |