xenocara/lib/libXaw/configure.ac

128 lines
2.8 KiB
Plaintext
Raw Normal View History

2006-11-25 09:53:47 -07:00
2011-06-02 07:40:13 -06:00
# Initialize Autoconf
AC_PREREQ([2.60])
2013-09-28 11:25:07 -06:00
AC_INIT([libXaw], [1.0.12],
2012-04-08 08:59:44 -06:00
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw])
2011-06-02 07:40:13 -06:00
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
2006-11-25 09:53:47 -07:00
2011-06-02 07:40:13 -06:00
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
2007-01-01 02:02:02 -07:00
AM_MAINTAINER_MODE
2006-11-25 09:53:47 -07:00
2012-04-08 08:59:44 -06:00
# Initialize libtool
AC_PROG_LIBTOOL
# Require xorg-macros minimum of 1.12 for DocBook external references
m4_ifndef([XORG_MACROS_VERSION],
2012-04-08 08:59:44 -06:00
[m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.12)
2011-06-02 07:40:13 -06:00
XORG_DEFAULT_OPTIONS
XORG_ENABLE_SPECS
2012-04-08 08:59:44 -06:00
XORG_WITH_XMLTO(0.0.22)
2011-06-02 07:40:13 -06:00
XORG_WITH_FOP
2012-04-08 08:59:44 -06:00
XORG_WITH_XSLTPROC
XORG_CHECK_SGML_DOCTOOLS(1.8)
2012-04-08 08:59:44 -06:00
# Some compilers do not support per target -c and -o flags
AM_PROG_CC_C_O
2006-11-25 09:53:47 -07:00
2012-04-08 08:59:44 -06:00
# Checks for programs.
AC_PROG_AWK
2007-09-30 07:42:29 -06:00
# Need to call this explicitly since the first call to PKG_CHECK_MODULES
# is in an if statement, and later calls would break if it's skipped.
PKG_PROG_PKG_CONFIG
2006-11-25 09:53:47 -07:00
#
# fix libtool to set SONAME to libXaw.so.$major
#
AC_CONFIG_COMMANDS([libtool_hack], [
cp -f libtool libtool_
test -z "$SED" && SED=sed
$SED '1,/^soname_spec/{
/^soname_spec/i\
# X.Org hack to match monolithic Xaw SONAME\
2006-11-25 09:53:47 -07:00
xorglibxawname="libXaw"
/^soname_spec/s/libname/xorglibxawname/
}' libtool_ > libtool
rm -f libtool_
])
# OSX/Win32 rules are different.
platform_win32=no
platform_darwin=no
LIBEXT=so
2006-11-25 09:53:47 -07:00
case $host_os in
cygwin*|mingw*)
LIBEXT=dll.a
2006-11-25 09:53:47 -07:00
platform_win32=yes
;;
darwin*)
LIBEXT=dylib
platform_darwin=yes
2006-11-25 09:53:47 -07:00
;;
esac
AC_SUBST(LIBEXT)
2006-11-25 09:53:47 -07:00
AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes")
AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes")
2006-11-25 09:53:47 -07:00
# some platforms don't even have shared libs
AM_CONDITIONAL(SHARED_LIBS, [test -f /usr/libexec/ld.so])
2006-11-25 09:53:47 -07:00
# Whether to build Xaw6
2012-04-08 08:59:44 -06:00
AC_ARG_ENABLE(xaw6, AS_HELP_STRING([--disable-xaw6],
2006-11-25 09:53:47 -07:00
[Disable building of libXaw.so.6]),
[build_v6=$enableval], [build_v6=yes])
2011-06-02 07:40:13 -06:00
if test "x$build_v6" = xyes; then
2006-11-25 09:53:47 -07:00
PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu)
2011-06-02 07:40:13 -06:00
fi
2006-11-25 09:53:47 -07:00
# Whether to build Xaw7
2012-04-08 08:59:44 -06:00
AC_ARG_ENABLE(xaw7, AS_HELP_STRING([--disable-xaw7],
2006-11-25 09:53:47 -07:00
[Disable building of libXaw.so.7]),
[build_v7=$enableval], [build_v7=yes])
2011-06-02 07:40:13 -06:00
if test "x$build_v7" = xyes; then
2006-11-25 09:53:47 -07:00
PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm)
2011-06-02 07:40:13 -06:00
fi
2006-11-25 09:53:47 -07:00
AM_CONDITIONAL(BUILD_XAW6, [test x$build_v6 = xyes])
AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes])
2006-11-25 09:53:47 -07:00
# Checks for header files.
2011-06-02 07:40:13 -06:00
AC_CHECK_HEADERS([wctype.h wchar.h widec.h])
2006-11-25 09:53:47 -07:00
2007-09-30 07:42:29 -06:00
# Checks for functions
2011-06-02 07:40:13 -06:00
AC_CHECK_FUNCS([iswalnum getpagesize])
2007-09-30 07:42:29 -06:00
2013-09-28 11:25:07 -06:00
# Link with winsock if mingw target
case $host_os in
*mingw*)
AC_CHECK_LIB([ws2_32],[main])
;;
*)
;;
esac
2011-06-02 07:40:13 -06:00
AC_CONFIG_FILES([Makefile
include/Makefile
man/Makefile
specs/Makefile
src/Makefile])
2006-11-25 09:53:47 -07:00
if test "x$build_v6" = xyes; then
2011-06-02 07:40:13 -06:00
AC_CONFIG_FILES(xaw6.pc)
2006-11-25 09:53:47 -07:00
fi
if test "x$build_v7" = xyes; then
2011-06-02 07:40:13 -06:00
AC_CONFIG_FILES(xaw7.pc)
2006-11-25 09:53:47 -07:00
fi
2011-06-02 07:40:13 -06:00
AC_OUTPUT