changeset 1611:2675e0edcc1d

First attempt at fixing dwindows-config --version after the build system versioning changes a couple versions ago... might require further tweaks.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 24 Mar 2012 14:57:20 +0000
parents 48a61abcd5bb
children 712c270f16d8
files Makefile.in configure configure.in dwindows-config.in dwindows-config1.in
diffstat 5 files changed, 84 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Sat Mar 03 08:43:46 2012 +0000
+++ b/Makefile.in	Sat Mar 24 14:57:20 2012 +0000
@@ -90,6 +90,7 @@
 	$(INSTALL) -d $(prefix)/bin; \
 	$(INSTALL) -d $(prefix)/share/man/man1; \
 	$(INSTALL) $(srcdir)/dw.h $(prefix)/include; \
+	sed -e 's/@DW_MAJOR_VERSION@/$(VER_MAJ)/' -e 's/@DW_MINOR_VERSION@/$(VER_MIN)/' -e 's/@DW_SUB_VERSION@/$(VER_REV)/' < dwindows-config1 > dwindows-config
 	$(INSTALL) dwindows-config $(prefix)/bin; \
 	$(INSTALL) $(srcdir)/dwindows-config.1 $(prefix)/share/man/man1; \
 	cd $(prefix)/share/man/man1; gzip -f -9 dwindows-config.1
@@ -136,6 +137,7 @@
 	rm -f *.a
 	rm -f $(DW_DIR)/*.o
 	rm -f dwtest
+	rm -f dwindows-config dwindows-config1
 
 $(SYSCONF_LINK_TARGET2): $(OBJECTS2)
 	$(SYSCONF_LINK_LIB2)
--- a/configure	Sat Mar 03 08:43:46 2012 +0000
+++ b/configure	Sat Mar 24 14:57:20 2012 +0000
@@ -5877,7 +5877,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile dwindows-config"
+ac_config_files="$ac_config_files Makefile dwindows-config1"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6583,7 +6583,7 @@
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "dwindows-config") CONFIG_FILES="$CONFIG_FILES dwindows-config" ;;
+    "dwindows-config1") CONFIG_FILES="$CONFIG_FILES dwindows-config1" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
--- a/configure.in	Sat Mar 03 08:43:46 2012 +0000
+++ b/configure.in	Sat Mar 24 14:57:20 2012 +0000
@@ -358,5 +358,5 @@
 
 AC_CONFIG_FILES([
 Makefile
-dwindows-config ])
+dwindows-config1 ])
 AC_OUTPUT
--- a/dwindows-config.in	Sat Mar 03 08:43:46 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-dw_libs="@LIBS@"
-dw_cflags="@CFLAGS@ -D@DW_DEFINE@"
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-exec_prefix_set=no
-
-usage()
-{
-	cat <<EOF
-Usage: dwindows-config [OPTIONS]
-Options:
-	[--prefix[=DIR]]
-	[--exec-prefix[=DIR]]
-	[--version]
-	[--libs]
-	[--cflags]
-EOF
-	exit $1
-}
-
-if test $# -eq 0; then
-	usage 1 1>&2
-fi
-
-while test $# -gt 0; do
-  case "$1" in
-  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  case $1 in
-    --prefix=*)
-      prefix=$optarg
-      if test $exec_prefix_set = no ; then
-        exec_prefix=$optarg
-      fi
-      ;;
-    --prefix)
-      echo_prefix=yes
-      ;;
-    --exec-prefix=*)
-      exec_prefix=$optarg
-      exec_prefix_set=yes
-      ;;
-    --version)
-      echo @DW_MAJOR_VERSION@.@DW_MINOR_VERSION@.@DW_SUB_VERSION@
-      ;;
-    --cflags)
-      echo_cflags=yes
-      ;;
-    --libs)
-      echo_libs=yes
-      ;;
-    *)
-      usage 1 1>&2
-      ;;
-  esac
-  shift
-done
-
-if test "$echo_prefix" = "yes"; then
-	echo $prefix
-fi
-
-if test "$echo_exec_prefix" = "yes"; then
-	echo $exec_prefix
-fi
-
-if test "$echo_cflags" = "yes"; then
-      echo -I${prefix}/include $dw_cflags
-fi
-
-if test "$echo_libs" = "yes"; then
-      echo -L${prefix}/lib -ldwindows $dw_libs
-fi
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwindows-config1.in	Sat Mar 24 14:57:20 2012 +0000
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+dw_libs="@LIBS@"
+dw_cflags="@CFLAGS@ -D@DW_DEFINE@"
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage()
+{
+	cat <<EOF
+Usage: dwindows-config [OPTIONS]
+Options:
+	[--prefix[=DIR]]
+	[--exec-prefix[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      if test $exec_prefix_set = no ; then
+        exec_prefix=$optarg
+      fi
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      exec_prefix_set=yes
+      ;;
+    --version)
+      echo @DW_MAJOR_VERSION@.@DW_MINOR_VERSION@.@DW_SUB_VERSION@
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+if test "$echo_prefix" = "yes"; then
+	echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+	echo $exec_prefix
+fi
+
+if test "$echo_cflags" = "yes"; then
+      echo -I${prefix}/include $dw_cflags
+fi
+
+if test "$echo_libs" = "yes"; then
+      echo -L${prefix}/lib -ldwindows $dw_libs
+fi
+