From eb71ecdc5871fe32efe4d5412e2dffd370170875 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 8 Jan 2013 18:04:16 +0000
Subject: [PATCH] Bugfix: the user provided path needs to be _pre_pended to
 PKG_CONFIG_PATH

Otherwise a system-wide installation will always override the
user choice.

[[Imported from SVN: r7627]]
---
 m4/ipopt.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/ipopt.m4 b/m4/ipopt.m4
index 5a167ae0..78f082b0 100644
--- a/m4/ipopt.m4
+++ b/m4/ipopt.m4
@@ -31,7 +31,7 @@ AS_IF([test x$with_ipopt != xno], [
     IPOPT_LIB_PATH="$IPOPTROOT/lib"
 
     # Check for ipopt and set IPOPT_*
-    export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$IPOPT_LIB_PATH/pkgconfig"
+    export PKG_CONFIG_PATH="$IPOPT_LIB_PATH/pkgconfig:$PKG_CONFIG_PATH"
     PKG_CHECK_MODULES([IPOPT], [ipopt], [
 	HAVE_IPOPT="1"
     ], [ dnl default rule would fail
-- 
GitLab