dnl This script is under the wxWindows licence.
dnl
dnl Version: $Id$
-dnl ////////////////////////////////////////////////////////////////////////
+dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl initialization
AC_INIT(wx-config.in)
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE(wxWindows, 2.1.0)
+
+dnl When making releases do:
+dnl
+dnl WX_RELEASE_NUMBER += 1
+dnl WX_INTERFACE_AGE += 1
+dnl WX_BINARY_AGE += 1
+dnl
+dnl if any functions have been added, do:
+dnl
+dnl WX_INTERFACE_AGE = 1
WX_MAJOR_VERSION_NUMBER=2
WX_MINOR_VERSION_NUMBER=1
WX_RELEASE_NUMBER=0
+WX_INTERFACE_AGE=0
+WX_BINARY_AGE=0
+
+WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
+
+AM_INIT_AUTOMAKE(wxWindows, $WX_VERSION)
+
+dnl libtool versioning
+LT_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER
+LT_CURRENT=`expr $WX_RELEASE_NUMBER - $WX_INTERFACE_AGE`
+LT_REVISION=$WX_INTERFACE_AGE
+LT_AGE=`expr $WX_BINARY_AGE - $WX_INTERFACE_AGE`
+AC_SUBST(LT_RELEASE)
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
dnl FIXME this hack suppresses automake 1.4 warning about @LTLIBOBJS@ being
dnl never defined in configure.in (remove these lines to see what I'm
dnl speaking about) - Tom Tromey <tromey@cygnus.com> told me that it will
dnl be fixed in the next release.
LIBOBJS=
-dnl LIBOBJS="$LIBOBJS common/extended.o"
+LIBOBJS="$LIBOBJS ../common/extended.o"
dnl ------------------------------------------------------------------------
dnl Check platform (host system)
wxUSE_UNIX=yes
AC_DEFINE(__UNIX__)
EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix"
+ SRC_SUBDIRS="$SRC_SUBDIRS unix"
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix"
fi
TOOLKIT_DEF=-D__WX${TOOLKIT}__
dnl the name of the (libtool) library
-WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}2.la"
+WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}.la"
+
+dnl the name of the library to be linked reported by wx-config
+WX_LIBRARY="wx_${TOOLKIT_DIR}"
dnl ------------------------------------------------------------------------
dnl Check for headers
AC_CHECK_HEADERS(wcstr.h)
dnl defines HAVE_FNMATCH_H
AC_CHECK_HEADERS(fnmatch.h)
+dnl defines HAVE_X11_XKBLIB_H
+AC_CHECK_HEADERS(X11/XKBlib.h)
dnl ---------------------------------------------------------------------------
dnl Checks for typedefs
dnl check the sizes of integral types (give some reasonable default values for
dnl cross-compiling)
dnl defines the size of certain types of variables in SIZEOF_<TYPE>
+AC_CHECK_SIZEOF(char, 1)
+AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int *, 4)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 0)
+dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
+WX_C_BIGENDIAN
+
dnl check for iostream (as opposed to iostream.h) standard header
WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
- LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ"
+dnl LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ"
dnl define autoconf macro to check for given function in both pthread and
dnl posix4 libraries
dnl Optional libraries
dnl ---------------------------------------------------------------------------
+ZLIB_INCLUDE=
if test "$wxUSE_ZLIB" = "yes" ; then
AC_DEFINE(wxUSE_ZLIB)
- EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../zlib"
- LTLIBOBJS="$LTLIBOBJS adler32.lo compress.lo crc32.lo gzio.lo uncompr.lo deflate.lo trees.lo zutil.lo inflate.lo infblock.lo inftrees.lo infcodes.lo infutil.lo inffast.lo"
+ EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/../zlib"
+ ZLIB_INCLUDE="-I\${srcdir}/../zlib"
+ LTLIBOBJS="$LTLIBOBJS adler32.lo compress.lo crc32.lo gzio.lo uncompr.lo deflate.lo \
+ trees.lo zutil.lo inflate.lo infblock.lo inftrees.lo infcodes.lo \
+ infutil.lo inffast.lo"
fi
+PNG_INCLUDE=
if test "$wxUSE_LIBPNG" = "yes" ; then
AC_DEFINE(wxUSE_LIBPNG)
- LTLIBOBJS="$LTLIBOBJS png.lo pngset.lo pngget.lo pngrutil.lo pngtrans.lo pngwutil.lo pngread.lo pngrio.lo pngwio.lo pngwrite.lo pngrtran.lo pngwtran.lo pngmem.lo pngerror.lo pngpread.lo"
- EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../png"
+ LTLIBOBJS="$LTLIBOBJS png.lo pngset.lo pngget.lo pngrutil.lo pngtrans.lo pngwutil.lo \
+ pngread.lo pngrio.lo pngwio.lo pngwrite.lo pngrtran.lo pngwtran.lo \
+ pngmem.lo pngerror.lo pngpread.lo"
+ EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/../png"
+ PNG_INCLUDE="-I\${srcdir}/../png"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png"
fi
AC_DEFINE(wxUSE_LIBGIF)
fi
+JPEG_INCLUDE=
if test "$wxUSE_LIBJPEG" = "yes" ; then
AC_DEFINE(wxUSE_LIBJPEG)
EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/../jpeg"
+ JPEG_INCLUDE="-I\${srcdir}/../jpeg"
LTLIBOBJS="$LTLIBOBJS \
jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \
jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo \
if test "$wxUSE_RESOURCES" = "yes" ; then
if test "$wxUSE_PROLOGIO" = "yes" ; then
AC_DEFINE(wxUSE_RESOURCES)
- LTLIBOBJS="$LTLIBOBJS resource.lo"
- if test "$wxUSE_GTK" = 1; then
- LTLIBOBJS="$LTLIBOBJS utilsres.lo"
- fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
else
AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.])
AC_DEFINE(wxUSE_RADIOBTN)
fi
-if test "wxUSE_SASH" = "yes"; then
+if test "$wxUSE_SASH" = "yes"; then
AC_DEFINE(wxUSE_SASH)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest"
fi
dnl all the libraries needed to link wxWindows programs (when the library is not
dnl yet installed)
-LIBS="\${top_builddir}/src/${WX_LIBRARY_NAME} $EXTRA_LIBS"
+LIBS="\${top_builddir}/src/${TOOLKIT_DIR}/${WX_LIBRARY_NAME} $EXTRA_LIBS"
dnl all -I options we must pass to the compiler
-INCLUDES="$TOOLKIT_INCLUDE $ZLIB_INCLUDE $LIBPNG_INCLUDE -I. -I\${top_builddir}/include -I\${top_srcdir}/include"
+INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TOOLKIT_INCLUDE"
dnl C/C++ compiler options used to compile wxWindows
if test "$ac_cv_prog_gcc" = "yes"; then
AC_SUBST(WX_MINOR_VERSION_NUMBER)
AC_SUBST(WX_RELEASE_NUMBER)
AC_SUBST(WX_LIBRARY_NAME)
+AC_SUBST(WX_LIBRARY)
dnl suppress libtool's informational messages - they duplicate its command line
LIBTOOL="$LIBTOOL --silent"
AC_SUBST(LTLIBOBJS)
dnl additional subdirectories where we will build
+AC_SUBST(SRC_SUBDIRS)
AC_SUBST(INCLUDE_SUBDIRS)
AC_SUBST(UTILS_SUBDIRS)
AC_SUBST(DOCS_SUBDIRS)
dnl colon)
AC_OUTPUT([
wx-config
- Makefile
- src/Makefile
- src/gtk/Makefile
+ Makefile
+ src/Makefile
+ src/gtk/Makefile
include/Makefile
include/wx/Makefile
include/wx/generic/Makefile
include/wx/msw/Makefile
include/wx/protocol/Makefile
include/wx/unix/Makefile
+ misc/Makefile
+ misc/afm/Makefile
+ misc/gs_afm/Makefile
samples/Makefile
samples/bombs/Makefile
samples/caret/Makefile
samples/splitter/Makefile
samples/tab/Makefile
samples/taskbar/Makefile
+ samples/text/Makefile
samples/thread/Makefile
samples/toolbar/Makefile
samples/treectrl/Makefile