diff mbox

Fix cunit path

Message ID 1412887630-34388-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 60498a7b5267758ff0fa4be29c4f7a351fc4ede3
Headers show

Commit Message

Mike Holmes Oct. 9, 2014, 8:47 p.m. UTC
Add include and lib path
Only check for cunit if no explicit path is given

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 configure.ac | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Comments

Mike Holmes Oct. 13, 2014, 4:56 p.m. UTC | #1
Any comments ?


On 9 October 2014 16:47, Mike Holmes <mike.holmes@linaro.org> wrote:

> Add include and lib path
> Only check for cunit if no explicit path is given
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  configure.ac | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a840e5e..aa94034 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -73,11 +73,16 @@ AC_ARG_ENABLE([cunit],
>  AC_ARG_WITH([cunit-path],
>  AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
>                 [(or in the default path if not specified).]),
> -[CUNIT_PATH=$withval cunit_support=yes ],[ ])
> -
> -AS_IF([test x$cunit_support = xyes ], [
> -      AC_CHECK_HEADERS([CUnit/Basic.h], [],
> -           [AC_MSG_FAILURE(["can't find cunit headers"])])
> +[CUNIT_PATH=$withval cunit_support=yes
> +AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH"
> +AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib -lcunit"
> +
> + ],
> +[
> +    AS_IF([test x$cunit_support = xyes ], [
> +        AC_CHECK_HEADERS([CUnit/Basic.h], [],
> +        [AC_MSG_FAILURE(["can't find cunit headers"])])
> +    ])
>  ])
>  AC_SUBST(CUNIT_PATH)
>  AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])
> --
> 1.9.1
>
>
Maxim Uvarov Oct. 15, 2014, 9:12 a.m. UTC | #2
Looks good, I think. Merged.

Maxim.

On 10/10/2014 12:47 AM, Mike Holmes wrote:
> Add include and lib path
> Only check for cunit if no explicit path is given
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   configure.ac | 15 ++++++++++-----
>   1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a840e5e..aa94034 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -73,11 +73,16 @@ AC_ARG_ENABLE([cunit],
>   AC_ARG_WITH([cunit-path],
>   AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
>                  [(or in the default path if not specified).]),
> -[CUNIT_PATH=$withval cunit_support=yes ],[ ])
> -
> -AS_IF([test x$cunit_support = xyes ], [
> -      AC_CHECK_HEADERS([CUnit/Basic.h], [],
> -           [AC_MSG_FAILURE(["can't find cunit headers"])])
> +[CUNIT_PATH=$withval cunit_support=yes
> +AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH"
> +AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib -lcunit"
> +
> + ],
> +[
> +    AS_IF([test x$cunit_support = xyes ], [
> +        AC_CHECK_HEADERS([CUnit/Basic.h], [],
> +        [AC_MSG_FAILURE(["can't find cunit headers"])])
> +    ])
>   ])
>   AC_SUBST(CUNIT_PATH)
>   AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index a840e5e..aa94034 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,11 +73,16 @@  AC_ARG_ENABLE([cunit],
 AC_ARG_WITH([cunit-path],
 AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
                [(or in the default path if not specified).]),
-[CUNIT_PATH=$withval cunit_support=yes ],[ ])
-
-AS_IF([test x$cunit_support = xyes ], [
-      AC_CHECK_HEADERS([CUnit/Basic.h], [],
-           [AC_MSG_FAILURE(["can't find cunit headers"])])
+[CUNIT_PATH=$withval cunit_support=yes
+AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH"
+AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib -lcunit"
+
+ ],
+[
+    AS_IF([test x$cunit_support = xyes ], [
+        AC_CHECK_HEADERS([CUnit/Basic.h], [],
+        [AC_MSG_FAILURE(["can't find cunit headers"])])
+    ])
 ])
 AC_SUBST(CUNIT_PATH)
 AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ])