]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Distribution things.
[wxWidgets.git] / configure.in
index f5a215647a7b70590d3e7f6b939bbe7c7716e6cd..7363ffb2f5f8f642776c4bb8e9124e0a09df10d8 100644 (file)
@@ -9,7 +9,7 @@ dnl
 dnl This script is under the wxWindows licence.
 dnl
 dnl Version: $Id$
-dnl ////////////////////////////////////////////////////////////////////////
+dnl ---------------------------------------------------------------------------
 
 dnl ---------------------------------------------------------------------------
 dnl initialization
@@ -19,18 +19,44 @@ dnl the file passed to AC_INIT should be speicific to our package
 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)
@@ -149,6 +175,7 @@ if test "$USE_UNIX" = 1 ; then
   wxUSE_UNIX=yes
   AC_DEFINE(__UNIX__)
   EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix"
+  SRC_SUBDIRS="$SRC_SUBDIRS unix"
   INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix"
 fi
 
@@ -998,7 +1025,10 @@ dnl the symbol which allows conditional compilation for the given toolkit
 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
@@ -1014,6 +1044,8 @@ dnl defines HAVE_WCSTR_H
 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
@@ -1046,13 +1078,15 @@ AC_C_INLINE
 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
-AC_C_BIGENDIAN
+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))
@@ -1284,16 +1318,24 @@ dnl ---------------------------------------------------------------------------
 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
 
@@ -1301,9 +1343,11 @@ if test "$wxUSE_LIBGIF" = "yes" ; then
   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 \
@@ -1583,7 +1627,6 @@ fi
 if test "$wxUSE_RESOURCES" = "yes" ; then
   if test "$wxUSE_PROLOGIO" = "yes" ; then
     AC_DEFINE(wxUSE_RESOURCES)
-    LTLIBOBJS="$LTLIBOBJS resource.lo"
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
   else
     AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.])
@@ -1811,10 +1854,10 @@ EXTRA_LIBS="$LIBS $POSIX4_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $GUILIBS"
 
 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="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $TOOLKIT_INCLUDE $ZLIB_INCLUDE $LIBPNG_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
@@ -1856,6 +1899,7 @@ AC_SUBST(WX_MAJOR_VERSION_NUMBER)
 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"
@@ -1875,6 +1919,7 @@ AC_SUBST(EXTRA_VPATH)
 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)
@@ -1902,9 +1947,9 @@ dnl (the original file name may be overriden by appending another name after a
 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
@@ -1913,6 +1958,9 @@ AC_OUTPUT([
             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
@@ -1954,6 +2002,7 @@ AC_OUTPUT([
             samples/splitter/Makefile
             samples/tab/Makefile
             samples/taskbar/Makefile
+            samples/text/Makefile
             samples/thread/Makefile
             samples/toolbar/Makefile
             samples/treectrl/Makefile