[chronojump] Expand libdir for chronojump and chronojump_mini to have right path (lib64 instead of lib for x64)



commit 1430bfa5bb8ce2840614bafcf5a4eb4e7a6f145a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Sep 23 20:11:15 2009 +0200

    Expand libdir for chronojump and chronojump_mini to have right path (lib64 instead of lib for x64)

 Makefile.am            |    2 +-
 configure.ac           |    5 ++++
 expansions.m4          |   50 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/chronojump.in      |    2 +-
 src/chronojump_mini.in |    2 +-
 5 files changed, 58 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7bf0d61..57e058e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = m4 
+EXTRA_DIST = m4 expansions.m4
 
 ACLOCAL_AMFLAGS = -I m4
 
diff --git a/configure.ac b/configure.ac
index d3b6c4b..5958431 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,11 @@ if test "x$PKG_CONFIG" = "xno"; then
         AC_MSG_ERROR([You need to install pkg-config])
 fi
 
+SHAMROCK_EXPAND_LIBDIR
+SHAMROCK_EXPAND_BINDIR
+SHAMROCK_EXPAND_DATADIR
+
+
 AC_PROG_INSTALL
 
 dnl Check for C# compiler
diff --git a/expansions.m4 b/expansions.m4
new file mode 100644
index 0000000..ba62356
--- /dev/null
+++ b/expansions.m4
@@ -0,0 +1,50 @@
+AC_DEFUN([SHAMROCK_EXPAND_LIBDIR],
+[	
+	expanded_libdir=`(
+		case $prefix in 
+			NONE) prefix=$ac_default_prefix ;; 
+			*) ;; 
+		esac
+		case $exec_prefix in 
+			NONE) exec_prefix=$prefix ;; 
+			*) ;; 
+		esac
+		eval echo $libdir
+	)`
+	AC_SUBST(expanded_libdir)
+])
+
+AC_DEFUN([SHAMROCK_EXPAND_BINDIR],
+[
+	expanded_bindir=`(
+		case $prefix in 
+			NONE) prefix=$ac_default_prefix ;; 
+			*) ;; 
+		esac
+		case $exec_prefix in 
+			NONE) exec_prefix=$prefix ;; 
+			*) ;; 
+		esac
+		eval echo $bindir
+	)`
+	AC_SUBST(expanded_bindir)
+])
+
+AC_DEFUN([SHAMROCK_EXPAND_DATADIR],
+[
+	case $prefix in
+		NONE) prefix=$ac_default_prefix ;;
+		*) ;;
+	esac
+
+	case $exec_prefix in
+		NONE) exec_prefix=$prefix ;;
+		*) ;;
+	esac
+
+	expanded_datadir=`(eval echo $datadir)`
+	expanded_datadir=`(eval echo $expanded_datadir)`
+
+	AC_SUBST(expanded_datadir)
+])
+
diff --git a/src/chronojump.in b/src/chronojump.in
index 4931451..858e042 100644
--- a/src/chronojump.in
+++ b/src/chronojump.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec mono "@prefix@/lib/@PACKAGE_TARNAME@/Chronojump.exe" "$@"
+exec mono "@expanded_libdir@/@PACKAGE@/Chronojump.exe" "$@"
diff --git a/src/chronojump_mini.in b/src/chronojump_mini.in
index 28fa089..ee4be4d 100644
--- a/src/chronojump_mini.in
+++ b/src/chronojump_mini.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec mono "@prefix@/lib/@PACKAGE_TARNAME@/Chronojump_Mini.exe" "$@"
+exec mono "@expanded_libdir@/@PACKAGE@/Chronojump_Mini.exe" "$@"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]