# Process this file with autoconf to produce a configure script. AC_INIT(src/main.c) AC_CANONICAL_SYSTEM AC_PREREQ(2.5) AM_INIT_AUTOMAKE(mt_gtk_client, 0.1.98) AM_CONFIG_HEADER(config.h) AC_ISC_POSIX # Checks for programs. AC_PROG_CC dnl AM_PROG_LIBTOOL AM_GNU_GETTEXT([external]) AC_ARG_ENABLE( gnome2, [ --enable-gnome2 Enable gnome2 support], [ GNOME2=yes ]) # Checks for libraries. if test "x$GNOME2" = "xyes"; then PKG_CHECK_MODULES(GLIB, libgnomeui-2.0 >= 2.0 glib-2.0 >= 1.3.1 gthread-2.0 >= 2.0 gtk+-2.0 >= 2.0 libxml-2.0 >= 2.0) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_DEFINE_UNQUOTED(GNOME2,"yes",[enable gnome2 support]) else PKG_CHECK_MODULES(GLIB, $LIBGNOMEUI glib-2.0 >= 1.3.1 gthread-2.0 >= 2.0 gtk+-2.0 >= 2.0 libxml-2.0 >= 2.0) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) fi AM_LIB_MAITRETAROT(0,0,0,$GLIB_CFLAGS, $GLIB_LIBS) AC_SUBST(LIBMT_CFLAGS) AC_SUBST(LIBMT_LIBS) AM_LIB_MT_CLIENT(0,0,0,$GLIB_CFLAGS, $GLIB_LIBS) AC_SUBST(LIBMT_CFLAGS) AC_SUBST(LIBMT_LIBS) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_TIME AC_C_CONST # Checks for library functions. AC_CHECK_FUNCS([bzero gethostbyname gethostname socket]) GETTEXT_PACKAGE=mtgtkclient AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[defines the GETTEXT package name]) dnl Add the languages which your application supports here. ALL_LINGUAS="fr" AM_GNU_GETTEXT dnl Use -Wall if we have gcc. changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl dnl installation path cardpics images cardpics_dir=$datadir/cardpics/images cardpics_flag="-DCARDPICS_DIR=\\\"$cardpics_dir/\\\"" AC_ARG_WITH( cardpics-dir, [ --with-cardpics-dir Directory containing the cardpics cards images], [cardpics_dir=${withval}; cardpics_flag="-DCARDPICS_DIR=\\\"${withval}\\\"" ]) AC_SUBST(cardpics_flag) AC_SUBST(cardpics_dir) dnl installation path mt_gtk_client_dir=$datadir/mt_gtk_client mt_gtk_client_flag="-DDATA_DIR=\\\"$mt_gtk_client_dir/\\\"" AC_ARG_ENABLE( install, [ --disable-install No installation. Played from the source directory.], [mt_gtk_client_dir=../data; mt_gtk_client_flag="-DDATA_DIR=\\\"../\\\"" ]) AC_SUBST(mt_gtk_client_flag) AC_SUBST(mt_gtk_client_dir) AC_OUTPUT([ po/Makefile.in m4/Makefile Makefile src/Makefile data/Makefile mt_gtk_client.spec ])