1# Configure.in 2# 3# This file tests for various compiler features needed to configure 4# the gtkmm package. Original skeleton was provided by Stephan Kulow. 5# All tests were written by Tero Pulkkinen, Mirko Streckenbach, and 6# Karl Nelson. 7# 8# NOTE! IF YOU DO CHANGES HERE, CHECK IF YOU NEED TO MODIFY .m4 TOO!!! 9# 10# Copyright 2001 Free Software Foundation 11# Copyright 1999 gtkmm Development Team 12# Copyright 1998 Stephan Kulow 13# 14AC_INIT(libgnomecanvas/libgnomecanvasmmconfig.h.in) 15 16######################################################################### 17# Version and initialization 18######################################################################### 19LIBGNOMECANVASMM_MAJOR_VERSION=2 20LIBGNOMECANVASMM_MINOR_VERSION=26 21LIBGNOMECANVASMM_MICRO_VERSION=0 22 23# 24# +1 : ? : +1 == new interface that does not break old one 25# +1 : ? : 0 == new interface that breaks old one 26# ? : ? : 0 == no new interfaces, but breaks apps 27# ? :+1 : ? == just some internal changes, nothing breaks but might work 28# better 29# CURRENT : REVISION : AGE 30LIBGNOMECANVASMM_SO_VERSION=1:6:0 31 32LIBGNOMECANVASMM_VERSION=$LIBGNOMECANVASMM_MAJOR_VERSION.$LIBGNOMECANVASMM_MINOR_VERSION.$LIBGNOMECANVASMM_MICRO_VERSION 33LIBGNOMECANVASMM_RELEASE=$LIBGNOMECANVASMM_MAJOR_VERSION.$LIBGNOMECANVASMM_MINOR_VERSION 34AC_DEFINE_UNQUOTED(LIBGNOMECANVASMM_MAJOR_VERSION, $LIBGNOMECANVASMM_MAJOR_VERSION) 35AC_DEFINE_UNQUOTED(LIBGNOMECANVASMM_MINOR_VERSION, $LIBGNOMECANVASMM_MINOR_VERSION) 36AC_DEFINE_UNQUOTED(LIBGNOMECANVASMM_MICRO_VERSION, $LIBGNOMECANVASMM_MICRO_VERSION) 37AC_SUBST(LIBGNOMECANVASMM_VERSION) 38AC_SUBST(LIBGNOMECANVASMM_RELEASE) 39AC_SUBST(LIBGNOMECANVASMM_SO_VERSION) 40 41AC_CONFIG_AUX_DIR(scripts) 42 43dnl For automake. 44VERSION=$LIBGNOMECANVASMM_VERSION 45PACKAGE=libgnomecanvasmm 46 47dnl Initialize automake stuff 48AM_INIT_AUTOMAKE($PACKAGE, $VERSION) 49 50dnl Specify a configuration file (no autoheader) 51AM_CONFIG_HEADER(libgnomecanvas/libgnomecanvasmmconfig.h) 52AM_MAINTAINER_MODE 53AL_ACLOCAL_INCLUDE(scripts) 54 55 56######################################################################### 57# Configure arguments 58######################################################################### 59 60######################################################################### 61# Environment Checks 62######################################################################### 63AC_PROG_CC 64AC_PROG_CPP 65AC_PROG_MAKE_SET 66AC_CANONICAL_HOST 67 68dnl Used for enabling the "-no-undefined" flag while generating DLLs 69dnl Copied from the official gtk+-2 configure.in 70AC_MSG_CHECKING([for some Win32 platform]) 71case "$host" in 72 *-*-mingw*|*-*-cygwin*) 73 platform_win32=yes 74 ;; 75 *) 76 platform_win32=no 77 ;; 78esac 79AC_MSG_RESULT([$platform_win32]) 80AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") 81 82AC_MSG_CHECKING([for native Win32]) 83case "$host" in 84 *-*-mingw*) 85 os_win32=yes 86 ;; 87 *) 88 os_win32=no 89 ;; 90esac 91AC_MSG_RESULT([$os_win32]) 92AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") 93 94AM_DISABLE_STATIC 95AC_LIBTOOL_WIN32_DLL 96AM_PROG_LIBTOOL 97 98AL_PROG_GNU_M4(AC_MSG_ERROR([dnl 99SUN m4 does not work for building gtkmm. 100Please install GNU m4.])) 101 102AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl 103SUN make does not work for building gtkmm. 104Please install GNU make.])) 105 106######################################################################### 107# Dependancy checks 108######################################################################### 109# Make these available to both PKG_CHECK_MODULES and the .pc.in file: 110GTKMM_VERSION_NEEDED=2.4.0 111AC_SUBST(GTKMM_VERSION_NEEDED) 112LIBGNOMECANVAS_VERSION_NEEDED=2.6.0 113AC_SUBST(LIBGNOMECANVAS_VERSION_NEEDED) 114 115PKG_CHECK_MODULES(LIBGNOMECANVASMM, gtkmm-2.4 >= $GTKMM_VERSION_NEEDED libgnomecanvas-2.0 >= $LIBGNOMECANVAS_VERSION_NEEDED) 116AC_SUBST(LIBGNOMECANVASMM_CFLAGS) 117AC_SUBST(LIBGNOMECANVASMM_LIBS) 118 119GLIBMM_LIBDIR=`pkg-config --variable=libdir glibmm-2.4` 120GMM_PROCDIR=$GLIBMM_LIBDIR/glibmm-2.4/proc 121AC_SUBST(GMM_PROCDIR) 122GMM_PROC=$GMM_PROCDIR/gmmproc 123AC_SUBST(GMM_PROC) 124 125######################################################################### 126# C++ checks 127######################################################################### 128AC_PROG_CXX 129 130# Ensure MSVC-compatible struct packing convention is used when 131# compiling for Win32 with gcc. 132# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while 133# gcc2 uses "-fnative-struct". 134if test x"$os_win32" = xyes; then 135 if test x"$GCC" = xyes -a x"$GXX" = xyes; then 136 msnative_struct='' 137 AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) 138 if test -z "$ac_cv_prog_CC"; then 139 our_gcc="$CC" 140 else 141 our_gcc="$ac_cv_prog_CC" 142 fi 143 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in 144 2.) 145 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then 146 msnative_struct='-fnative-struct' 147 fi 148 ;; 149 *) 150 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then 151 msnative_struct='-mms-bitfields' 152 fi 153 ;; 154 esac 155 if test x"$msnative_struct" = x ; then 156 AC_MSG_RESULT([no way]) 157 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) 158 else 159 CXXFLAGS="$CXXFLAGS $msnative_struct" 160 AC_MSG_RESULT([${msnative_struct}]) 161 fi 162 fi 163fi 164 165AC_LANG_CPLUSPLUS 166 167 168# Dummy conditional just to make automake-1.4 happy. 169# We need an always-false condition in docs/Makefile.am. 170AM_CONDITIONAL(LIBGNOMECANVASMM_FALSE,[false]) 171 172# HACK: Assign a dummy in order to prevent execution of autoheader by the 173# maintainer-mode rules. That would fail since we aren't using autoheader. 174AUTOHEADER=':' 175 176 177AC_OUTPUT([ 178 Makefile 179 libgnomecanvasmm.spec 180 181 libgnomecanvas/Makefile 182 libgnomecanvas/libgnomecanvasmm-2.6.pc 183 libgnomecanvas/libgnomecanvasmm-2.6-uninstalled.pc 184 libgnomecanvas/src/Makefile 185 libgnomecanvas/libgnomecanvasmm/Makefile 186 libgnomecanvas/libgnomecanvasmm/private/Makefile 187 188 tools/Makefile 189 tools/extra_defs_gen/Makefile 190 tools/m4/Makefile 191 192 demos/Makefile 193 194 scripts/Makefile 195 196 docs/Makefile 197 docs/reference/Makefile 198 docs/reference/Doxyfile 199 200 examples/Makefile 201 examples/canvas/Makefile 202 examples/canvas_affine/Makefile 203 examples/canvas_events/Makefile 204]) 205 206