configure.ac revision 421c997b
1 2# Initialize Autoconf 3AC_PREREQ([2.60]) 4AC_INIT([libXaw], [1.0.11], 5 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw]) 6AC_CONFIG_SRCDIR([Makefile.am]) 7AC_CONFIG_HEADERS([config.h]) 8 9# Initialize Automake 10AM_INIT_AUTOMAKE([foreign dist-bzip2]) 11AM_MAINTAINER_MODE 12 13# Initialize libtool 14AC_PROG_LIBTOOL 15 16# Require xorg-macros minimum of 1.12 for DocBook external references 17m4_ifndef([XORG_MACROS_VERSION], 18 [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])]) 19XORG_MACROS_VERSION(1.12) 20XORG_DEFAULT_OPTIONS 21XORG_ENABLE_SPECS 22XORG_WITH_XMLTO(0.0.22) 23XORG_WITH_FOP 24XORG_WITH_XSLTPROC 25XORG_CHECK_SGML_DOCTOOLS(1.8) 26 27# Some compilers do not support per target -c and -o flags 28AM_PROG_CC_C_O 29 30# Checks for programs. 31AC_PROG_AWK 32 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. 35PKG_PROG_PKG_CONFIG 36 37# 38# fix libtool to set SONAME to libXaw.so.$major 39# 40AC_CONFIG_COMMANDS([libtool_hack], [ 41 cp -f libtool libtool_ 42 test -z "$SED" && SED=sed 43 $SED '1,/^soname_spec/{ 44/^soname_spec/i\ 45# X.Org hack to match monolithic Xaw SONAME\ 46xorglibxawname="libXaw" 47/^soname_spec/s/libname/xorglibxawname/ 48}' libtool_ > libtool 49 rm -f libtool_ 50]) 51 52# OSX/Win32 rules are different. 53platform_win32=no 54platform_darwin=no 55LIBEXT=so 56case $host_os in 57 cygwin*|mingw*) 58 LIBEXT=dll.a 59 platform_win32=yes 60 ;; 61 darwin*) 62 LIBEXT=dylib 63 platform_darwin=yes 64 ;; 65esac 66AC_SUBST(LIBEXT) 67AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes") 68AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes") 69 70# Whether to build Xaw6 71 72AC_ARG_ENABLE(xaw6, AS_HELP_STRING([--disable-xaw6], 73 [Disable building of libXaw.so.6]), 74 [build_v6=$enableval], [build_v6=yes]) 75 76if test "x$build_v6" = xyes; then 77 PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu) 78fi 79 80 81# Whether to build Xaw7 82 83AC_ARG_ENABLE(xaw7, AS_HELP_STRING([--disable-xaw7], 84 [Disable building of libXaw.so.7]), 85 [build_v7=$enableval], [build_v7=yes]) 86 87if test "x$build_v7" = xyes; then 88 PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm) 89fi 90 91 92AM_CONDITIONAL(BUILD_XAW6, [test x$build_v6 = xyes]) 93AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes]) 94 95# Checks for header files. 96AC_CHECK_HEADERS([wctype.h wchar.h widec.h]) 97 98# Checks for functions 99AC_CHECK_FUNCS([iswalnum getpagesize]) 100 101AC_CONFIG_FILES([Makefile 102 include/Makefile 103 man/Makefile 104 specs/Makefile 105 src/Makefile]) 106 107if test "x$build_v6" = xyes; then 108 AC_CONFIG_FILES(xaw6.pc) 109fi 110 111if test "x$build_v7" = xyes; then 112 AC_CONFIG_FILES(xaw7.pc) 113fi 114 115AC_OUTPUT 116