Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (62 sloc) 1.41 KB
AC_INIT(src/swmain.c)
AC_CONFIG_AUX_DIR(autotools)
VERSION=1.7.1
AC_SUBST(VERSION)
AC_CANONICAL_SYSTEM
dnl optimisations
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl check for cc
AC_PROG_CC
AC_PROG_RANLIB
AC_ARG_ENABLE(psion, [ --enable-psion Compile for Psion Linux], [
psiprefix=arm-uclibc
echo "*** psion hack: using $psiprefix as prefix for compile utils"
target=$psiprefix
CC="${psiprefix}-gcc"
LD="${psiprefix}-ld"
AR="${psiprefix}-ar"
NM="${psiprefix}-nm"
RANLIB="${psiprefix}-ranlib"
SOPWITH_BINS=psopwith
SOPWITH_SUBDIRS=psion
CFLAGS="$CFLAGS -DPSION"
])
dnl network libraries
case "$target" in
*-*-cygwin* | *-*-mingw32*)
LDFLAGS="$LDFLAGS -lwsock32"
;;
sparc*-*-solaris*)
LDFLAGS="$LDFLAGS -lsocket -lnsl"
;;
*-*-qnx*)
LDFLAGS="$LDFLAGS -lsocket"
;;
esac
AM_INIT_AUTOMAKE(sopwith,$VERSION)
AM_CONFIG_HEADER(config.h:config.hin)
dnl install programs
AC_PROG_INSTALL
dnl libraries
AM_PATH_SDL(1.1.3, [
SOPWITH_BINS="$SOPWITH_BINS sopwith"
SOPWITH_SUBDIRS="$SOPWITH_SUBDIRS sdl"
],)
PKG_CHECK_MODULES(GTK, glib-2.0 >= 2.0 gtk+-2.0 >= 2.0, [
SOPWITH_BINS="$SOPWITH_BINS gtksopwith"
SOPWITH_SUBDIRS="$SOPWITH_SUBDIRS gtk"
],)
AC_SUBST(SOPWITH_BINS)
AC_SUBST(SOPWITH_SUBDIRS)
dnl check for TCPIP support
AC_CHECK_HEADER(netinet/ip.h, AC_DEFINE(TCPIP),,)
dnl generate Makefiles
AC_OUTPUT([
Makefile
src/Makefile
src/gtk/Makefile
src/sdl/Makefile
src/psion/Makefile
doc/Makefile
])