dnl Process this file with autoconf to produce a configure script. dnl Author: Michael Patra dnl AC_REVISION([configure.in 1.00]) AC_INIT(controls/edit.c) AC_CONFIG_HEADER(include/config.h) AC_CONFIG_AUX_DIR(tools) # We want these before the checks, so the checks can modify their values. LIBS="$LIBS -lm" test -z "$PROGEXT" && PROGEXT="" AC_SUBST(PROGEXT) dnl **** Command-line arguments **** dnl Default values MAIN_TARGET=emu LIB_TARGET=libwine.a AC_ARG_ENABLE(emulator, [ --disable-emulator build only the Wine library, not the emulator], [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi]) AC_ARG_ENABLE(dll, [ --enable-dll build the Wine library as a DLL], [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi]) dnl AC_ARG_WITH(ipc, dnl [ --enable-ipc use inter-process communication for DDE], dnl [if test "$enableval" = "no"; then : ; else OPTIONS="-DCONFIG_IPC"; fi]) AC_ARG_WITH(reentrant-x, [ --without-reentrant-x Compile for use with non-reentrant X libraries]) AC_SUBST(MAIN_TARGET) AC_SUBST(LIB_TARGET) AC_SUBST(OPTIONS) dnl **** Check for some programs **** AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CPP AC_PATH_XTRA AC_PROG_YACC AC_PROG_LEX AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_LN_S AC_CHECK_PROG(C2MAN,c2man,c2man,true) dnl **** Check for some libraries **** dnl Check for -li386 for NetBSD and OpenBSD AC_CHECK_LIB(i386,i386_set_ldt) dnl Check for -lw for Solaris AC_CHECK_LIB(w,iswalnum) dnl Check for XFree86 DGA extension AC_CHECK_LIB(Xxf86dga,XF86DGAQueryExtension,AC_DEFINE(HAVE_LIBXXF86DGA) X_PRE_LIBS="$X_PRE_LIBS -lXxf86dga",,$X_LIBS -lXext -lX11) dnl **** Check for Open Sound System **** AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h) AC_CACHE_CHECK("for Open Sound System", ac_cv_c_opensoundsystem, AC_TRY_COMPILE([ #ifdef HAVE_SYS_SOUNDCARD_H #include #endif #ifdef HAVE_MACHINE_SOUNDCARD_H #include #endif ],[ /* check for one of the Open Sound System specific SNDCTL_ defines */ #if !defined(SNDCTL_DSP_STEREO) #error No open sound system #endif ], ac_cv_c_opensoundsystem="yes" AC_DEFINE(HAVE_OSS), ac_cv_c_opensoundsystem="no" )) dnl **** Check for union semun **** AC_CACHE_CHECK("for union semun", ac_cv_c_union_semun, AC_TRY_COMPILE([#include #include ],[union semun foo], ac_cv_c_union_semun="yes", ac_cv_c_union_semun="no")) if test "$ac_cv_c_union_semun" = "yes" then AC_DEFINE(HAVE_UNION_SEMUN) fi dnl **** If ln -s doesn't work, use cp instead **** if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi dnl **** Check for gcc strength-reduce bug **** if test "x${GCC}" = "xyes" then CFLAGS="$CFLAGS -Wall" AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug, AC_TRY_RUN([ int main(void) { static int Array[[3]]; unsigned int B = 3; int i; for(i=0; i conftest_asm.s < conftest_asm.s < #ifdef HAVE_SYS_PARAM_H # include #endif #ifdef HAVE_SYS_STATFS_H # include #endif #ifdef HAVE_SYS_MOUNT_H # include #endif #ifdef HAVE_SYS_VFS_H # include #endif ],[ struct statfs stfs; stfs.f_bavail++; ],wine_cv_statfs_bavail=yes,wine_cv_statfs_bavail=no ) fi ] ) if test "$wine_cv_statfs_bavail" = "yes" then AC_DEFINE(STATFS_HAS_BAVAIL) fi AC_CACHE_CHECK( "for statfs.f_bfree", wine_cv_statfs_bfree, [ if test "x$statfs_bfree" = "xno" then wine_cv_statfs_bfree=no else AC_TRY_COMPILE([ #include #ifdef HAVE_SYS_PARAM_H # include #endif #ifdef HAVE_SYS_STATFS_H # include #endif #ifdef HAVE_SYS_MOUNT_H # include #endif #ifdef HAVE_SYS_VFS_H # include #endif ],[ struct statfs stfs; stfs.f_bfree++; ],wine_cv_statfs_bfree=yes,wine_cv_statfs_bfree=no ) fi ] ) if test "$wine_cv_statfs_bfree" = "yes" then AC_DEFINE(STATFS_HAS_BFREE) fi dnl **** Generate output files **** MAKE_RULES=Make.rules AC_SUBST_FILE(MAKE_RULES) AC_OUTPUT([ Make.rules Makefile controls/Makefile debugger/Makefile documentation/Makefile files/Makefile graphics/Makefile graphics/metafiledrv/Makefile graphics/win16drv/Makefile graphics/x11drv/Makefile if1632/Makefile ipc/Makefile library/Makefile libtest/Makefile loader/Makefile loader/ne/Makefile memory/Makefile misc/Makefile miscemu/Makefile msdos/Makefile multimedia/Makefile objects/Makefile ole/Makefile programs/Makefile programs/clock/Makefile programs/notepad/Makefile programs/progman/Makefile programs/view/Makefile programs/winhelp/Makefile programs/winver/Makefile rc/Makefile relay32/Makefile resources/Makefile scheduler/Makefile tools/Makefile tsx11/Makefile win32/Makefile windows/Makefile ]) echo echo "Configure finished. Do 'make depend; make' to compile Wine." echo dnl Local Variables: dnl comment-start: "dnl " dnl comment-end: "" dnl comment-start-skip: "\\bdnl\\b\\s *" dnl compile-command: "autoconf" dnl End: