Message ID | 1416844898-12631-4-git-send-email-anders.roxell@linaro.org |
---|---|
State | Superseded |
Headers | show |
On 24 November 2014 at 11:01, Anders Roxell <anders.roxell@linaro.org> wrote: > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> > --- > configure.ac | 29 ++++++++++++++++++++--------- > test/validation/Makefile.am | 3 +-- > 2 files changed, 21 insertions(+), 11 deletions(-) > > diff --git a/configure.ac b/configure.ac > index acd0060..9df4754 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -70,18 +70,16 @@ AC_ARG_ENABLE([cunit], > cunit_support=yes > fi]) > > +########################################################################## > +# Set optional CUnit path > +########################################################################## > 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"])]) > - ]) > -]) > -AC_SUBST(CUNIT_PATH) > -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) > + [CUNIT_PATH=$withval > + AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH/include" > + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" > + cunit_support=yes],[]) > > ########################################################################## > # Enable/disable ODP_DEBUG_PRINT > @@ -145,6 +143,19 @@ LDFLAGS="$AM_LDFLAGS $LDFLAGS" > CFLAGS="$AM_CFLAGS $CFLAGS" > > ########################################################################## > +# Check for CUnit availability > +########################################################################## > +if test x$cunit_support = xyes > +then > + AC_CHECK_LIB([cunit],[CU_get_error], [], > + [AC_MSG_ERROR([CUnit libraries required])]) > + AC_CHECK_HEADERS([CUnit/Basic.h], [], > + [AC_MSG_FAILURE(["can't find cunit headers"])]) > +fi > + > +AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) > + > +########################################################################## > # Check for OpenSSL availability > ########################################################################## > AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], > diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am > index 0b831d0..874fd05 100644 > --- a/test/validation/Makefile.am > +++ b/test/validation/Makefile.am > @@ -1,7 +1,6 @@ > include $(top_srcdir)/test/Makefile.inc > > -AM_CFLAGS += -I$(CUNIT_PATH)/include > -AM_LDFLAGS += -L$(CUNIT_PATH)/lib -static -lcunit > +AM_LDFLAGS += -static > > if ODP_CUNIT_ENABLED > TESTS = ${bin_PROGRAMS} > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Should have been v2 On 1 December 2014 at 16:28, Mike Holmes <mike.holmes@linaro.org> wrote: > > > On 24 November 2014 at 11:01, Anders Roxell <anders.roxell@linaro.org> > wrote: > >> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> >> > > Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> > > >> --- >> configure.ac | 29 ++++++++++++++++++++--------- >> test/validation/Makefile.am | 3 +-- >> 2 files changed, 21 insertions(+), 11 deletions(-) >> >> diff --git a/configure.ac b/configure.ac >> index acd0060..9df4754 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -70,18 +70,16 @@ AC_ARG_ENABLE([cunit], >> cunit_support=yes >> fi]) >> >> >> +########################################################################## >> +# Set optional CUnit path >> >> +########################################################################## >> 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"])]) >> - ]) >> -]) >> -AC_SUBST(CUNIT_PATH) >> -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) >> + [CUNIT_PATH=$withval >> + AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH/include" >> + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" >> + cunit_support=yes],[]) >> >> >> ########################################################################## >> # Enable/disable ODP_DEBUG_PRINT >> @@ -145,6 +143,19 @@ LDFLAGS="$AM_LDFLAGS $LDFLAGS" >> CFLAGS="$AM_CFLAGS $CFLAGS" >> >> >> ########################################################################## >> +# Check for CUnit availability >> >> +########################################################################## >> +if test x$cunit_support = xyes >> +then >> + AC_CHECK_LIB([cunit],[CU_get_error], [], >> + [AC_MSG_ERROR([CUnit libraries required])]) >> + AC_CHECK_HEADERS([CUnit/Basic.h], [], >> + [AC_MSG_FAILURE(["can't find cunit headers"])]) >> +fi >> + >> +AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) >> + >> >> +########################################################################## >> # Check for OpenSSL availability >> >> ########################################################################## >> AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], >> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am >> index 0b831d0..874fd05 100644 >> --- a/test/validation/Makefile.am >> +++ b/test/validation/Makefile.am >> @@ -1,7 +1,6 @@ >> include $(top_srcdir)/test/Makefile.inc >> >> -AM_CFLAGS += -I$(CUNIT_PATH)/include >> -AM_LDFLAGS += -L$(CUNIT_PATH)/lib -static -lcunit >> +AM_LDFLAGS += -static >> >> if ODP_CUNIT_ENABLED >> TESTS = ${bin_PROGRAMS} >> -- >> 2.1.0 >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > > > > -- > *Mike Holmes* > Linaro Sr Technical Manager > LNG - ODP >
diff --git a/configure.ac b/configure.ac index acd0060..9df4754 100644 --- a/configure.ac +++ b/configure.ac @@ -70,18 +70,16 @@ AC_ARG_ENABLE([cunit], cunit_support=yes fi]) +########################################################################## +# Set optional CUnit path +########################################################################## 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"])]) - ]) -]) -AC_SUBST(CUNIT_PATH) -AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) + [CUNIT_PATH=$withval + AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH/include" + AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" + cunit_support=yes],[]) ########################################################################## # Enable/disable ODP_DEBUG_PRINT @@ -145,6 +143,19 @@ LDFLAGS="$AM_LDFLAGS $LDFLAGS" CFLAGS="$AM_CFLAGS $CFLAGS" ########################################################################## +# Check for CUnit availability +########################################################################## +if test x$cunit_support = xyes +then + AC_CHECK_LIB([cunit],[CU_get_error], [], + [AC_MSG_ERROR([CUnit libraries required])]) + AC_CHECK_HEADERS([CUnit/Basic.h], [], + [AC_MSG_FAILURE(["can't find cunit headers"])]) +fi + +AM_CONDITIONAL([ODP_CUNIT_ENABLED], [test x$cunit_support = xyes ]) + +########################################################################## # Check for OpenSSL availability ########################################################################## AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am index 0b831d0..874fd05 100644 --- a/test/validation/Makefile.am +++ b/test/validation/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/test/Makefile.inc -AM_CFLAGS += -I$(CUNIT_PATH)/include -AM_LDFLAGS += -L$(CUNIT_PATH)/lib -static -lcunit +AM_LDFLAGS += -static if ODP_CUNIT_ENABLED TESTS = ${bin_PROGRAMS}
Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- configure.ac | 29 ++++++++++++++++++++--------- test/validation/Makefile.am | 3 +-- 2 files changed, 21 insertions(+), 11 deletions(-)