*** tips/configure.in 2003-08-05 00:20:54.000000000 -0600 --- configure.in 2003-08-04 22:35:32.000000000 -0600 *************** *** 18,23 **** --- 18,24 ---- dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + AC_INIT(GNU Backgammon,0.14-devel,address@hidden,gnubg) AC_CONFIG_SRCDIR(gnubg.c) AM_INIT_AUTOMAKE *************** *** 28,33 **** --- 29,35 ---- . ./config.options fi + dnl Checks for programs. AC_PROG_AWK AC_PROG_CC *************** *** 46,51 **** --- 48,105 ---- AC_CHECK_PROG(SRCONV, srconv, srconv, true) AC_CHECK_PROG(TR, tr, tr) + dnl Shamelessly stolen taken from the libgnomecanvas configure.in + dnl with slight modifications. Check for Win32 Native platform + dnl then determine appropriate directive for the gcc compiler - + dnl choose between -fnative-struct or -mms-bitfields. + + AC_MSG_CHECKING([for native Win32]) + case "$host" in + *-*-mingw*) + win32=yes + ;; + *) + win32=no + ;; + esac + AC_MSG_RESULT([$win32]) + AM_CONDITIONAL(OS_WIN32, test "$win32" = yes) + + # Ensure MSVC-compatible struct packing convention is used when + # compiling for Win32 with gcc. GTK+ uses this convention, so we must, too. + # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while + # gcc2 uses "-fnative-struct". + if test x"$win32" = xyes; then + if test x"$GCC" = xyes; then + msnative_struct='' + AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) + if test -z "$ac_cv_prog_CC"; then + our_gcc="$CC" + else + our_gcc="$ac_cv_prog_CC" + fi + case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in + 2.) + if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then + msnative_struct='-fnative-struct' + fi + ;; + *) + if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then + msnative_struct='-mms-bitfields' + fi + ;; + esac + if test x"$msnative_struct" = x ; then + AC_MSG_RESULT([no way]) + AC_MSG_WARN([produced libraries will be incompatible with prebuilt GTK+ DLLs]) + else + CFLAGS="$CFLAGS $msnative_struct" + AC_MSG_RESULT([${msnative_struct}]) + fi + fi + fi + AC_DEFINE(_GNU_SOURCE,1,Enable GNU extensions on systems that have them.) *************** *** 112,125 **** --- 166,183 ---- AC_CHECK_DECL(basename) if test "$ac_cv_have_decl_basename" = no; then AC_CHECK_HEADERS(libgen.h) + libgen=yes fi fi if test "$ac_cv_func_dirname" = yes; then AC_CHECK_DECL(dirname) if test "$ac_cv_have_decl_dirname" = no; then AC_CHECK_HEADERS(libgen.h) + libgen=yes fi fi + AM_CONDITIONAL(HAVE_LIBGEN, test "$libgen" = yes) + AC_CHECK_FUNCS(acosf asinf atanf cosf lrint sinf tanf) *************** *** 352,375 **** if test "$with_sound" != "no"; then AC_DEFINE(USE_SOUND,1,Define if you want to use sounds with GNU Backgammon) ! ! AM_PATH_ESD(,AC_DEFINE(HAVE_ESD,1,[Define if you have the ESD sound system])) ! AM_PATH_ARTSC(,AC_DEFINE(HAVE_ARTSC,1,[Define if you have ArtsC sound system])) ! AM_PATH_AUDIOFILE(0.2.0,AC_DEFINE(HAVE_AUDIOFILE,1, ! [Define if you have the audiofile library])) ! ! AC_ARG_ENABLE(nas, [ --enable-nas Enable NAS (Network Audio System) support],,enable_nas=no) ! ! if test "$enable_nas" != "no"; then ! AC_DEFINE(HAVE_NAS,1,Define if you have the NAS sound system) ! NAS_LIBS="-laudio -lXt" ! NAS_CFLAGS= fi - fi AC_SUBST(NAS_LIBS) AC_SUBST(NAS_CFLAGS) dnl test for libpng --- 410,440 ---- if test "$with_sound" != "no"; then AC_DEFINE(USE_SOUND,1,Define if you want to use sounds with GNU Backgammon) ! if test "$win32" != "yes"; then ! AM_PATH_ESD(,AC_DEFINE(HAVE_ESD,1,[Define if you have the ESD sound system])) ! AM_PATH_ARTSC(,AC_DEFINE(HAVE_ARTSC,1,[Define if you have ArtsC sound system])) ! AM_PATH_AUDIOFILE(0.2.0,AC_DEFINE(HAVE_AUDIOFILE,1, ! [Define if you have the audiofile library])) ! ! AC_ARG_ENABLE(nas, [ --enable-nas Enable NAS (Network Audio System) support],,enable_nas=no) ! ! if test "$enable_nas" != "no"; then ! AC_DEFINE(HAVE_NAS,1,Define if you have the NAS sound system) ! NAS_LIBS="-laudio -lXt" ! NAS_CFLAGS= ! fi ! else ! AC_DEFINE(USE_WINMMSND,1,Define if you wish to use the Win32 WINMM sound system) ! WINMMSND_LIBS="-lwinmm" ! WINMMSND_CFLAGS= fi fi + AM_CONDITIONAL(HAVE_WINMMSND, test "$win32" != "no" ) AC_SUBST(NAS_LIBS) AC_SUBST(NAS_CFLAGS) + AC_SUBST(WINMMSND_LIBS) + AC_SUBST(WINMMSND_CFLAGS) dnl test for libpng *************** *** 408,418 **** AC_CHECK_DECL(FALSE,,AC_DEFINE(FALSE,0,[Define FALSE])) AC_CHECK_DECL(TRUE,,AC_DEFINE(TRUE,1,[Define TRUE])) - dnl define WIN32 for wintendo systems - - os=`config.guess | sed 's/.*-//'` - if test "$os" = "mingw32"; then - AC_DEFINE(WIN32,1,[Define if you use wintendo]) - fi AC_OUTPUT(Makefile doc/Makefile ext/Makefile lib/Makefile met/Makefile po/Makefile.in po/Makefile intl/Makefile m4/Makefile xpm/Makefile sounds/Makefile ) --- 473,477 ----