4 AC_INIT([libXaw], [1.0.11],
5 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw])
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AC_CONFIG_HEADERS([config.h])
10 AM_INIT_AUTOMAKE([foreign dist-bzip2])
16 # Require xorg-macros minimum of 1.12 for DocBook external references
17 m4_ifndef([XORG_MACROS_VERSION],
18 [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
19 XORG_MACROS_VERSION(1.12)
22 XORG_WITH_XMLTO(0.0.22)
25 XORG_CHECK_SGML_DOCTOOLS(1.8)
27 # Some compilers do not support per target -c and -o flags
30 # Checks for programs.
33 # Need to call this explicitly since the first call to PKG_CHECK_MODULES
34 # is in an if statement, and later calls would break if it's skipped.
38 # fix libtool to set SONAME to libXaw.so.$major
40 AC_CONFIG_COMMANDS([libtool_hack], [
41 cp -f libtool libtool_
42 test -z "$SED" && SED=sed
43 $SED '1,/^soname_spec/{
45 # X.Org hack to match monolithic Xaw SONAME\
46 xorglibxawname="libXaw"
47 /^soname_spec/s/libname/xorglibxawname/
52 # OSX/Win32 rules are different.
67 AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes")
68 AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes")
70 # Whether to build Xaw6
72 AC_ARG_ENABLE(xaw6, AS_HELP_STRING([--disable-xaw6],
73 [Disable building of libXaw.so.6]),
74 [build_v6=$enableval], [build_v6=yes])
76 if test "x$build_v6" = xyes; then
77 PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu)
81 # Whether to build Xaw7
83 AC_ARG_ENABLE(xaw7, AS_HELP_STRING([--disable-xaw7],
84 [Disable building of libXaw.so.7]),
85 [build_v7=$enableval], [build_v7=yes])
87 if test "x$build_v7" = xyes; then
88 PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm)
92 AM_CONDITIONAL(BUILD_XAW6, [test x$build_v6 = xyes])
93 AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes])
95 # Checks for header files.
96 AC_CHECK_HEADERS([wctype.h wchar.h widec.h])
98 # Checks for functions
99 AC_CHECK_FUNCS([iswalnum getpagesize])
101 AC_CONFIG_FILES([Makefile
107 if test "x$build_v6" = xyes; then
108 AC_CONFIG_FILES(xaw6.pc)
111 if test "x$build_v7" = xyes; then
112 AC_CONFIG_FILES(xaw7.pc)