configure.in   configure.in 
include(aclocal.m4) include(aclocal.m4)
AC_INIT(aalib.c) AC_INIT(src/aalib.c)
AM_INIT_AUTOMAKE(aalib,1.2) AM_INIT_AUTOMAKE(aalib,1.4.0)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(src/config.h)
dnl Initialize the compiler and linker flags for AALIB applications
AALIB_CFLAGS=""
AALIB_LIBS="-laa"
dnl Output the video drivers we use
if test x$enable_video = xtrue; then
if test "$VIDEO_SUBDIRS" = ""; then
AC_MSG_ERROR(*** No video drivers are enabled!)
fi
fi
dnl Checks for programs. dnl Checks for programs.
x_driver_test=yes x_driver_test=yes
curses_driver_test=yes curses_driver_test=yes
linux_driver_test=yes linux_driver_test=yes
slang_driver_test=yes slang_driver_test=yes
force_curses_driver=false force_curses_driver=false
x_kbddriver_test=yes x_kbddriver_test=yes
curses_kbddriver_test=yes curses_kbddriver_test=yes
slang_kbddriver_test=yes slang_kbddriver_test=yes
curses_mousedriver_test=yes curses_mousedriver_test=yes
gpm_mousedriver_test=yes gpm_mousedriver_test=yes
x_mousedriver_test=yes x_mousedriver_test=yes
use_cc_g_flag=no use_cc_g_flag=no
CCOPTS="$CFLAGS"
AC_PROG_CC AC_PROG_CC
AM_PROG_LIBTOOL AM_PROG_LIBTOOL
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
CFLAGS="$CCOPTS"
AC_PROG_INSTALL AC_PROG_INSTALL
dnl detect OS dnl detect OS
AC_CHECK_PROG(system,uname,`uname`,unknown) AC_CHECK_PROG(system,uname,`uname`,unknown)
if test "x$system" = xLinux; then if test "x$system" = xLinux; then
AC_CHECK_PROG(machine,uname,`uname --machine`,unknown) AC_CHECK_PROG(machine,uname,`uname --machine`,unknown)
fi fi
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_LIB(m, pow) AC_CHECK_LIB(m, pow)
if test "x$ac_cv_lib_m_pow" = xyes; then
AALIB_LIBS="$AALIB_LIBS -lm"
fi
cc_uses_g=yes cc_uses_g=yes
if test x$GCC = xyes; then if test x$GCC = xyes; then
if test x$ac_cv_prog_gcc_g = xyes; then if test x$ac_cv_prog_gcc_g = xyes; then
: :
else else
cc_uses_g=no cc_uses_g=no
fi fi
fi fi
if test "x$CCOPTS" = x; then
if test x$GCC = xyes; then
if test x$machine = xi486; then
mflag=486
fi
if test x$machine = xi586; then
mflag=486
fi
if test x$mflag = x486; then
CCOPTS='-m486 -O2 -m486 -fstrength-reduce -ffast-math -fomit-fr
ame-pointer'
if test x$use_cc_g_flag = xyes; then
if test $cc_uses_g = yes; then
CCOPTS='-m486 -g -O'
fi
fi
else
CCOPTS='-O2 -fstrength-reduce -ffast-math -fomit-frame-pointer'
if test x$use_cc_g_flag = xyes; then
if test $cc_uses_g = yes; then
CCOPTS='-g -O'
fi
fi
fi
else
if test x$use_cc_g_flag = xyes; then
CCOPTS="$CFLAGS"
else
CCOPTS=
fi
fi
fi
CFLAGS="$CCOPTS"
dnl command line options dnl command line options
AC_ARG_WITH(x11-driver, AC_ARG_WITH(x11-driver,
[ --with-x11-driver=no Used to disable x11 driver],[ [ --with-x11-driver=no Used to disable x11 driver],[
if test x$withval = xno; then if test x$withval = xno; then
x_driver_test=no x_driver_test=no
fi fi
]) ])
AC_ARG_WITH(slang-driver, AC_ARG_WITH(slang-driver,
[ --with-slang-driver=no Used to disable slang driver],[ [ --with-slang-driver=no Used to disable slang driver],[
if test x$withval = xno; then if test x$withval = xno; then
vga_driver_test=no slang_driver_test=no
fi fi
]) ])
AC_ARG_WITH(curses-driver, AC_ARG_WITH(curses-driver,
[ --with-curses-driver=no/yes Used to disable/force curses driver] ,[ [ --with-curses-driver=no/yes Used to disable/force curses driver] ,[
if test x$withval = xno; then if test x$withval = xno; then
curses_driver_test=no curses_driver_test=no
fi fi
if test x$withval = xyes; then if test x$withval = xyes; then
force_curses_driver=true force_curses_driver=true
fi fi
skipping to change at line 112 skipping to change at line 95
AC_ARG_WITH(gpm-mouse, AC_ARG_WITH(gpm-mouse,
[ --with-gpm-mouse=base-dir Specifies the base gpm directory], [ --with-gpm-mouse=base-dir Specifies the base gpm directory],
if test x$withval = xyes if test x$withval = xyes
then then
AC_MSG_WARN(Usage is: --with-gpm-mouse=base-dir) AC_MSG_WARN(Usage is: --with-gpm-mouse=base-dir)
else else
LIBS="$LIBS -L$withval/lib -lgpm" LIBS="$LIBS -L$withval/lib -lgpm"
AC_DEFINE(GPM_MOUSEDRIVER) AC_DEFINE(GPM_MOUSEDRIVER)
gpm_mousedriver=true gpm_mousedriver=true
CFLAGS="$CFLAGS -I$withval/include" CFLAGS="$CFLAGS -I$withval/include"
AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lgpm"
AC_MSG_RESULT(defining use_gpm) AC_MSG_RESULT(defining use_gpm)
fi fi
) )
if test "$x_driver_test" = yes; then if test "$x_driver_test" = yes; then
AC_PATH_X AC_PATH_X
AC_PATH_XTRA AC_PATH_XTRA
if test "x$no_x" = x; then if test "x$no_x" = x; then
x_driver=true x_driver=true
AC_DEFINE(X11_DRIVER) AC_DEFINE(X11_DRIVER)
LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11" LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
AALIB_LIBS="$AALIB_LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
CFLAGS="$CFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
fi fi
fi fi
if test "$gpm_mousedriver_test" = yes; then if test "$gpm_mousedriver_test" = yes; then
AC_CHECK_LIB(gpm, Gpm_Repeat,[ AC_CHECK_LIB(gpm, Gpm_Repeat,[
AC_DEFINE(GPM_MOUSEDRIVER) AC_DEFINE(GPM_MOUSEDRIVER)
gpm_mousedriver=true gpm_mousedriver=true
AALIB_LIBS="$AALIB_LIBS -lgpm"
LIBS="$LIBS -lgpm"]) LIBS="$LIBS -lgpm"])
fi fi
dnl dnl
dnl This part supplies reasonable defaults for CFLAGS, if they weren't dnl This part supplies reasonable defaults for CFLAGS, if they weren't
dnl specified by ''CFLAGS=flags ./configure'' dnl specified by ''CFLAGS=flags ./configure''
dnl dnl
search_ncurses=true search_ncurses=true
AC_DEFUN(AC_USE_SUNOS_CURSES, [ AC_DEFUN(AC_USE_SUNOS_CURSES, [
skipping to change at line 163 skipping to change at line 149
AC_DEFUN(AC_USE_OSF1_CURSES, [ AC_DEFUN(AC_USE_OSF1_CURSES, [
AC_MSG_RESULT(Using OSF1 curses) AC_MSG_RESULT(Using OSF1 curses)
search_ncurses=false search_ncurses=false
curses_driver=true curses_driver=true
screen_manager="OSF1 curses" screen_manager="OSF1 curses"
AC_DEFINE(NO_COLOR_SUPPORT) AC_DEFINE(NO_COLOR_SUPPORT)
AC_DEFINE(USE_SYSV_CURSES) AC_DEFINE(USE_SYSV_CURSES)
XCURSES="xcurses.o" XCURSES="xcurses.o"
LIBS="$LIBS -lcurses" LIBS="$LIBS -lcurses"
AALIB_LIBS="$AALIB_LIBS -lcurses"
]) ])
AC_DEFUN(AC_USE_SYSV_CURSES, [ AC_DEFUN(AC_USE_SYSV_CURSES, [
AC_MSG_RESULT(Using SysV curses) AC_MSG_RESULT(Using SysV curses)
curses_driver=true curses_driver=true
AC_DEFINE(USE_SYSV_CURSES) AC_DEFINE(USE_SYSV_CURSES)
XCURSES="" XCURSES=""
search_ncurses=false search_ncurses=false
screen_manager="SysV/curses" screen_manager="SysV/curses"
LIBS="$LIBS -lcurses" LIBS="$LIBS -lcurses"
AALIB_LIBS="$AALIB_LIBS -lcurses"
]) ])
XCURSES="" XCURSES=""
AC_SUBST(XCURSES)
AC_ARG_WITH(sunos-curses, AC_ARG_WITH(sunos-curses,
[ --with-sunos-curses Used to force SunOS 4.x curses],[ [ --with-sunos-curses Used to force SunOS 4.x curses],[
if test x$withval = xyes; then if test x$withval = xyes; then
AC_USE_SUNOS_CURSES AC_USE_SUNOS_CURSES
fi fi
]) ])
AC_ARG_WITH(osf1-curses, AC_ARG_WITH(osf1-curses,
[ --with-osf1-curses Used to force OSF/1 curses],[ [ --with-osf1-curses Used to force OSF/1 curses],[
skipping to change at line 209 skipping to change at line 196
AC_USE_SYSV_CURSES AC_USE_SYSV_CURSES
) )
AC_ARG_WITH(ncurses, AC_ARG_WITH(ncurses,
[ --with-ncurses[=base-dir] Compile with ncurses/locate base dir], [ --with-ncurses[=base-dir] Compile with ncurses/locate base dir],
if test x$withval = xyes if test x$withval = xyes
then then
search_ncurses=true search_ncurses=true
else else
LIBS="$LIBS -L$withval/lib -lncurses" LIBS="$LIBS -L$withval/lib -lncurses"
AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lncurses"
CFLAGS="$CFLAGS -I$withval/include" CFLAGS="$CFLAGS -I$withval/include"
search_ncurses=false search_ncurses=false
curses_driver=true curses_driver=true
screen_manager="ncurses" screen_manager="ncurses"
AC_DEFINE(USE_NCURSES) AC_DEFINE(USE_NCURSES)
fi fi
) )
if test "$slang_driver_test" = yes; then if test "$slang_driver_test" = yes; then
AC_DEFUN(AC_SLANG, [ AC_DEFUN(AC_SLANG, [
if $search_slang if $search_slang
then then
if test -f $1/$2 if test -f $1/$2
then then
LIBS1="$LIBS" LIBS1="$LIBS"
LIBS="$LIBS $3" LIBS="$LIBS $3"
AC_CHECK_LIB(slang, SLsmg_init_smg) AC_CHECK_LIB(slang, SLsmg_init_smg)
if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then
AC_MSG_RESULT(Found slang on $1/$2) AC_MSG_RESULT(Found slang on $1/$2)
AALIB_LIBS="$AALIB_LIBS $3 -lslang"
LIBS="$LIBS $3" LIBS="$LIBS $3"
CFLAGS="$CFLAGS $4" CFLAGS="$CFLAGS $4"
slang_driver=true slang_driver=true
search_slang=false search_slang=false
AC_DEFINE(SLANG_DRIVER) AC_DEFINE(SLANG_DRIVER)
else else
unset ac_cv_lib_slang_SLsmg_init_smg unset ac_cv_lib_slang_SLsmg_init_smg
LIBS="$LIBS1" LIBS="$LIBS1"
fi fi
fi fi
fi fi
]) ])
AC_SLANG(/usr/include, slang.h, , -I/usr/include/slang , "slang on /usr/i nclude") AC_SLANG(/usr/include, slang.h, , -I/usr/include , "slang on /usr/include ")
AC_SLANG(/usr/include/slang, slang.h, , -I/usr/include/slang , "slang on /usr/include/slang") AC_SLANG(/usr/include/slang, slang.h, , -I/usr/include/slang , "slang on /usr/include/slang")
AC_SLANG(/usr/local/include, slang.h, , -I/usr/local/include/slang , "sla ng on /usr/local/include") AC_SLANG(/usr/local/include, slang.h, , -I/usr/local/include/slang , "sla ng on /usr/local/include")
AC_SLANG(/usr/local/include/slang, slang.h, , -I/usr/local/include/slang , "slang on /usr/local/include/slang") AC_SLANG(/usr/local/include/slang, slang.h, , -I/usr/local/include/slang , "slang on /usr/local/include/slang")
if test "$slang_driver" = true; then if test "$slang_driver" = true; then
if test "$force_curses_driver" = false; then if test "$force_curses_driver" = false; then
echo "Disabling curses driver since slang is available" echo "Disabling curses driver since slang is available"
curses_driver_test=no curses_driver_test=no
fi fi
fi fi
fi fi
skipping to change at line 265 skipping to change at line 254
AC_DEFUN(AC_NCURSES, [ AC_DEFUN(AC_NCURSES, [
if $search_ncurses if $search_ncurses
then then
if test -f $1/$2 if test -f $1/$2
then then
LIBS1="$LIBS" LIBS1="$LIBS"
LIBS="$LIBS $3" LIBS="$LIBS $3"
AC_CHECK_LIB(ncurses, initscr) AC_CHECK_LIB(ncurses, initscr)
if test "x$ac_cv_lib_ncurses_initscr" = xyes; then if test "x$ac_cv_lib_ncurses_initscr" = xyes; then
AC_MSG_RESULT(Found ncurses on $1/$2) AC_MSG_RESULT(Found ncurses on $1/$2)
AALIB_LIBS="$AALIB_LIBS $3 -lncurses"
LIBS="$LIBS $3" LIBS="$LIBS $3"
CFLAGS="$CFLAGS $4" CFLAGS="$CFLAGS $4"
search_ncurses=false search_ncurses=false
curses_driver=true curses_driver=true
screen_manager=$5 screen_manager=$5
AC_DEFINE(USE_NCURSES) AC_DEFINE(USE_NCURSES)
else else
unset ac_cv_lib_ncurses_initscr unset ac_cv_lib_ncurses_initscr
LIBS="$LIBS1" LIBS="$LIBS1"
fi fi
skipping to change at line 295 skipping to change at line 285
if test -f $1/$2 if test -f $1/$2
then then
LIBS1="$LIBS" LIBS1="$LIBS"
LIBS="$LIBS $3" LIBS="$LIBS $3"
AC_CHECK_LIB(curses, initscr) AC_CHECK_LIB(curses, initscr)
if test "x$ac_cv_lib_curses_initscr" = xyes; then if test "x$ac_cv_lib_curses_initscr" = xyes; then
AC_MSG_RESULT(Found generic curses on $1/$2) AC_MSG_RESULT(Found generic curses on $1/$2)
CFLAGS="$CFLAGS $4" CFLAGS="$CFLAGS $4"
search_ncurses=false search_ncurses=false
curses_driver=true curses_driver=true
AALIB_LIBS="$AALIB_LIBS $3 -lcurses"
AC_DEFINE(CURSES_DRIVER) AC_DEFINE(CURSES_DRIVER)
screen_manager=$5 screen_manager=$5
AC_DEFINE(USE_CURSES) AC_DEFINE(USE_CURSES)
else else
unset ac_cv_lib_curses_initscr unset ac_cv_lib_curses_initscr
LIBS="$LIBS1" LIBS="$LIBS1"
fi fi
fi fi
fi fi
]) ])
skipping to change at line 359 skipping to change at line 350
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_STRUCT_ST_RDEV AC_STRUCT_ST_RDEV
AC_HEADER_TIME AC_HEADER_TIME
dnl Checks for library functions. dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strdup) AC_CHECK_FUNCS(strdup)
AC_SUBST(profile) case "$target" in
AC_SUBST(omitfp) *-*-linux*)
ARCH=linux
;;
*-*-bsdi*)
ARCH=bsdi
;;
*-*-freebsd*)
ARCH=freebsd
;;
*-*-solaris*)
ARCH=solaris
;;
*)
ARCH=other
;;
esac
# Set runtime shared library paths as needed
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
AALIB_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
fi
if test $ARCH = solaris; then
AALIB_RLD_FLAGS="-R\${exec_prefix}/lib"
fi
dnl Expand the cflags and libraries needed by apps using AALIB
AC_SUBST(AALIB_CFLAGS)
AC_SUBST(AALIB_LIBS)
AC_SUBST(AALIB_RLD_FLAGS)
AC_SUBST(XCURSES)
# Set conditional variables for shared and static library selection.
# These are not used in any Makefile.am but in sdl-config.in.
AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
echo "CFLAGS $CFLAGS" echo "CFLAGS $CFLAGS"
echo "LDFLAGS $LDFLAGS" echo "LDFLAGS $LIBS"
echo "AA-LIBD $AALIB_LIBS"
echo "CC $CC" echo "CC $CC"
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
echo "Display drivers:" echo "Display drivers:"
if test "$slang_driver" = true; then if test "$slang_driver" = true; then
echo " slang" echo " slang"
if test "$slang_kbddriver_test" = yes; then if test "$slang_kbddriver_test" = yes; then
AC_DEFINE(SLANG_KBDDRIVER) AC_DEFINE(SLANG_KBDDRIVER)
slang_kbddriver=true slang_kbddriver=true
fi fi
fi fi
skipping to change at line 393 skipping to change at line 421
if test "x$ac_cv_func_mousemask" = xyes; then if test "x$ac_cv_func_mousemask" = xyes; then
AC_DEFINE(CURSES_MOUSEDRIVER) AC_DEFINE(CURSES_MOUSEDRIVER)
curses_mousedriver=true curses_mousedriver=true
fi fi
fi fi
fi fi
if test "$linux_driver_test" = yes; then if test "$linux_driver_test" = yes; then
if test "x$system" = xLinux; then if test "x$system" = xLinux; then
echo " Linux console" echo " Linux console"
AC_DEFINE(LINUX_DRIVER) AC_DEFINE(LINUX_DRIVER)
AC_DEFINE(LINUX_KBDDRIVER)
fi fi
fi fi
if test "$x_driver" = true; then if test "$x_driver" = true; then
echo " x11" echo " x11"
if test "$x_kbddriver_test" = yes; then if test "$x_kbddriver_test" = yes; then
AC_DEFINE(X11_KBDDRIVER) AC_DEFINE(X11_KBDDRIVER)
x_kbddriver=true x_kbddriver=true
fi fi
if test "$x_mousedriver_test" = yes; then if test "$x_mousedriver_test" = yes; then
AC_DEFINE(X11_MOUSEDRIVER) AC_DEFINE(X11_MOUSEDRIVER)
x_mousedriver=true x_mousedriver=true
fi fi
fi fi
echo "Keyboard drivers:" echo "Keyboard drivers:"
if test "$linux_driver_test" = yes; then
if test "x$system" = xLinux; then
echo " Linux console"
fi
fi
if test "$slang_kbddriver" = true; then if test "$slang_kbddriver" = true; then
echo " slang" echo " slang"
fi fi
if test "$curses_kbddriver" = true; then if test "$curses_kbddriver" = true; then
echo " curses" echo " curses"
fi fi
if test "$x_kbddriver" = true; then if test "$x_kbddriver" = true; then
echo " X11" echo " X11"
fi fi
echo "Mouse drivers:" echo "Mouse drivers:"
skipping to change at line 428 skipping to change at line 462
echo " curses" echo " curses"
fi fi
if test "$gpm_mousedriver" = true; then if test "$gpm_mousedriver" = true; then
echo " gpm" echo " gpm"
fi fi
if test "$x_mousedriver" = true; then if test "$x_mousedriver" = true; then
echo " X11" echo " X11"
fi fi
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
AC_OUTPUT(Makefile) AC_OUTPUT([Makefile man/Makefile doc/Makefile src/Makefile aalib-config],
[chmod +x aalib-config])
 End of changes. 23 change blocks. 
45 lines changed or deleted 78 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/