changeset 1351:751f127439f7

Changes to the build system to no longer use the version during configure. The evaluation of the variables is delayed until during make. This allows the version to be imported from the Version file. Making a new version is as simple as updating the Version file... autoconf and configure no longer need to be run each time.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 15 Nov 2011 14:39:58 +0000
parents 4333b58d879d
children 08de3c1f4ae4
files Makefile.in configure configure.in
diffstat 3 files changed, 15 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Tue Nov 15 13:26:15 2011 +0000
+++ b/Makefile.in	Tue Nov 15 14:39:58 2011 +0000
@@ -3,11 +3,8 @@
 CC	=	@CC@
 PLATCCFLAGS = @PLATCCFLAGS@
 MLFLAGS	=	-L.
-#
-# Uncomment DEPRECATED line to force use of GTK 3.x support
-#
-#DEPRECATED = -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES
-CCFLAGS = $(DEPRECATED) @CFLAGS@ $(PLATCCFLAGS) @ARCH@ -D@DW_DEFINE@ -DBUILD_DLL -DDW_RESOURCES -DVER_REV=$(VER_REV)
+include Version
+CCFLAGS = @CFLAGS@ $(PLATCCFLAGS) @ARCH@ -D@DW_DEFINE@ -DBUILD_DLL -DDW_RESOURCES -DVER_REV=$(VER_REV)
 LFLAGS	=	@LIBS@ @ARCH@
 ARFLAGS = @ARFLAGS@
 INSTALL =	@INSTALL@
@@ -24,8 +21,8 @@
 OBJECTS2=	$(COMPAT_OBJECT)
 TARGET2=	@TARGET2@
 TARGETS = @TARGETS@
-VER_MAJ	=	@DW_MAJOR_VERSION@
-VER_MIN	=	@DW_MINOR_VERSION@
+VER_MAJ	=	$(DW_MAJOR_VERSION)
+VER_MIN	=	$(DW_MINOR_VERSION)
 VER_REV =	@SVNVERSION@
 SOSUFFIX=	@SOSUFFIX@
 SONAME=	@SONAME@
--- a/configure	Tue Nov 15 13:26:15 2011 +0000
+++ b/configure	Tue Nov 15 14:39:58 2011 +0000
@@ -665,9 +665,6 @@
 LDFLAGS
 CFLAGS
 CC
-DW_SUB_VERSION
-DW_MINOR_VERSION
-DW_MAJOR_VERSION
 TARGET2
 TARGET
 target_alias
@@ -1367,7 +1364,7 @@
   --with-gtkframework     specify this to build dwindows with GTK+ Framework (only relevant for OSX)
   --with-gtkhtml          specify this to build dwindows with libgtkhtml-2
   --with-gtkmozembed      specify this to build dwindows with Mozilla gtkmozembed
-  --with-arch             specify architecture: one of all, 32bit, 64bit, ppc, ppc64, x86_64, i386
+  --with-arch             specify architecture: one of all, 32bit, 64bit, intel, ppc, ppc64, x86_64, i386
   --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)
   --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)
   --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)
@@ -2207,10 +2204,6 @@
 ac_config_headers="$ac_config_headers config.h"
 
 
-DW_MAJOR_VERSION=2
-DW_MINOR_VERSION=1
-DW_SUB_VERSION=0
-
 TARGET="dwindows"
 TARGET2="dwcompat"
 
@@ -2226,9 +2219,6 @@
 LIBSUFFIX=a
 LIBPREFIX=lib
 
-
-
-
 INCLUDES="-I."
 
 ac_ext=c
@@ -3658,13 +3648,13 @@
 if test $with_compat = yes; then
    COMPAT_OBJECT="compat.o"
    INSTALL_COMPAT="installcompat"
-   SYSCONF_LINK_TARGET_SHARED2="lib$TARGET2.$SOSUFFIX.$DW_MAJOR_VERSION.$DW_MINOR_VERSION"
+   SYSCONF_LINK_TARGET_SHARED2="lib$TARGET2.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
 else
    COMPAT_OBJECT=""
    INSTALL_COMPAT=""
    SYSCONF_LINK_TARGET_SHARED2=""
 fi
-SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.$DW_MAJOR_VERSION.$DW_MINOR_VERSION"
+SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a"
 
 
@@ -4599,7 +4589,7 @@
 
    ;;
    *linux*)
-      SONAME="-Wl,-soname,lib$TARGET.so.$DW_MAJOR_VERSION"
+      SONAME="-Wl,-soname,lib$TARGET.so.\$(DW_MAJOR_VERSION)"
    ;;
    *nto-qnx*)
       DW_DIR="photon"
@@ -4633,11 +4623,14 @@
          64bit)
             ARCH="-arch ppc64 -arch x86_64"
             ;;
+         intel)
+            ARCH="-arch i386 -arch x86_64"
+            ;;
          *)
             ARCH="-arch $with_arch"
             ;;
       esac
-      SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress"
+      SHAREDFLAG="-dynamiclib -flat_namespace -undefined suppress -headerpad_max_install_names"
       SOSUFFIX=dylib
       if test $with_gtkframework = yes; then
          DW_DIR=gtk
--- a/configure.in	Tue Nov 15 13:26:15 2011 +0000
+++ b/configure.in	Tue Nov 15 14:39:58 2011 +0000
@@ -1,10 +1,6 @@
 AC_INIT(winmain.c)
 AC_CONFIG_HEADER(config.h)
 
-DW_MAJOR_VERSION=2
-DW_MINOR_VERSION=1
-DW_SUB_VERSION=0
-
 TARGET="dwindows"
 TARGET2="dwcompat"
 AC_SUBST(TARGET)
@@ -19,9 +15,6 @@
 SOSUFFIX=so
 LIBSUFFIX=a
 LIBPREFIX=lib
-AC_SUBST(DW_MAJOR_VERSION)
-AC_SUBST(DW_MINOR_VERSION)
-AC_SUBST(DW_SUB_VERSION)
 
 INCLUDES="-I."
 
@@ -66,13 +59,13 @@
 if test $with_compat = yes; then
    COMPAT_OBJECT="compat.o"
    INSTALL_COMPAT="installcompat"
-   SYSCONF_LINK_TARGET_SHARED2="lib$TARGET2.$SOSUFFIX.$DW_MAJOR_VERSION.$DW_MINOR_VERSION"
+   SYSCONF_LINK_TARGET_SHARED2="lib$TARGET2.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
 else
    COMPAT_OBJECT=""
    INSTALL_COMPAT=""
    SYSCONF_LINK_TARGET_SHARED2=""
 fi
-SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.$DW_MAJOR_VERSION.$DW_MINOR_VERSION"
+SYSCONF_LINK_TARGET_SHARED="lib$TARGET.$SOSUFFIX.\$(DW_MAJOR_VERSION).\$(DW_MINOR_VERSION)"
 SYSCONF_LINK_TARGET_STATIC="lib$TARGET.a"
 
 dnl ---------------------- check for '--with-gtk+' switch -----------------
@@ -153,7 +146,7 @@
       AC_DEFINE(DW_USE_GTK)
    ;;
    *linux*)
-      SONAME="-Wl,-soname,lib$TARGET.so.$DW_MAJOR_VERSION"
+      SONAME="-Wl,-soname,lib$TARGET.so.\$(DW_MAJOR_VERSION)"
    ;;
    *nto-qnx*)
       DW_DIR="photon"