diff mbox

[PATCHv6,1/3] configure.ac: disable shared library for non abi compat mode

Message ID CAK--WWOdA+KeECoW7f+un5Q3tanSCKnG-epnz-L3_m-YR6pOUw@mail.gmail.com
State New
Headers show

Commit Message

Anders Roxell Nov. 24, 2016, 8:12 p.m. UTC
On 24 November 2016 at 17:03, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> original configure.ac enables abi compat mode by default,

> even without --enable-abi-compat provided. And has broken

> logic to disable abi compat mode. Correct logic to build abi

> compat mode and option to disable it. Shared library is not

> needed for non abi compat mode, so turn it off.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> ---

>  configure.ac | 9 ++++++---

>  1 file changed, 6 insertions(+), 3 deletions(-)

>

> diff --git a/configure.ac b/configure.ac

> index be5a292..7cb0c7a 100644

> --- a/configure.ac

> +++ b/configure.ac

> @@ -241,16 +241,19 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"

>  ODP_ABI_COMPAT=1

>  abi_compat=yes

>  AC_ARG_ENABLE([abi-compat],

> -    [  --enable-abi-compat     build all targets in ABI compatible mode (default=yes)],

> +    [  --disable-abi-compat    disable build all targets in ABI compatible mode (default=no)],

>      [if test "x$enableval" = "xyes"; then

>         ODP_ABI_COMPAT=1

> -       abi_compat=yes

>       else

>         ODP_ABI_COMPAT=0

> -       abi_compat=no

>      fi])

>  AC_SUBST(ODP_ABI_COMPAT)

>

> +if test $ODP_ABI_COMPAT -eq 0; then

> +       enable_shared=no

> +       abi_compat=no

> +fi

> +

>  ##########################################################################

>  # Default warning setup

>  ##########################################################################

> --

> 2.7.1.250.gff4ea60

>


I think it should look something like this:
$ git df
 AC_SUBST(ODP_ABI_COMPAT)

@@ -336,6 +334,7 @@ AC_MSG_RESULT([
        static libraries:       ${enable_static}
        shared libraries:       ${enable_shared}
        ABI compatible:         ${abi_compat}
+       ODP_ABI_COMPAT:         ${ODP_ABI_COMPAT}
        cunit:                  ${cunit_support}
        test_vald:              ${test_vald}
        test_perf:              ${test_perf}

Comments

Maxim Uvarov Nov. 24, 2016, 8:20 p.m. UTC | #1
On 11/24/16 23:12, Anders Roxell wrote:
> On 24 November 2016 at 17:03, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> original configure.ac enables abi compat mode by default,

>> even without --enable-abi-compat provided. And has broken

>> logic to disable abi compat mode. Correct logic to build abi

>> compat mode and option to disable it. Shared library is not

>> needed for non abi compat mode, so turn it off.

>>

>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>> ---

>>   configure.ac | 9 ++++++---

>>   1 file changed, 6 insertions(+), 3 deletions(-)

>>

>> diff --git a/configure.ac b/configure.ac

>> index be5a292..7cb0c7a 100644

>> --- a/configure.ac

>> +++ b/configure.ac

>> @@ -241,16 +241,19 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"

>>   ODP_ABI_COMPAT=1

>>   abi_compat=yes

>>   AC_ARG_ENABLE([abi-compat],

>> -    [  --enable-abi-compat     build all targets in ABI compatible mode (default=yes)],

>> +    [  --disable-abi-compat    disable build all targets in ABI compatible mode (default=no)],

>>       [if test "x$enableval" = "xyes"; then

>>          ODP_ABI_COMPAT=1

>> -       abi_compat=yes

>>        else

>>          ODP_ABI_COMPAT=0

>> -       abi_compat=no

>>       fi])

>>   AC_SUBST(ODP_ABI_COMPAT)

>>

>> +if test $ODP_ABI_COMPAT -eq 0; then

>> +       enable_shared=no

>> +       abi_compat=no

>> +fi

>> +

>>   ##########################################################################

>>   # Default warning setup

>>   ##########################################################################

>> --

>> 2.7.1.250.gff4ea60

>>

> I think it should look something like this:

> $ git df

> diff --git a/configure.ac b/configure.ac

> index be5a292..7becc2a 100644

> --- a/configure.ac

> +++ b/configure.ac

> @@ -241,13 +241,11 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"

>   ODP_ABI_COMPAT=1

>   abi_compat=yes

>   AC_ARG_ENABLE([abi-compat],

> -    [  --enable-abi-compat     build all targets in ABI compatible

> mode (default=yes)],

> -    [if test "x$enableval" = "xyes"; then

> -       ODP_ABI_COMPAT=1

> -       abi_compat=yes

> -     else

> +    [  --disable-abi-compat     disables ABI compatible mode, enables

> inline code in header files],

> +    [if test "x$enableval" = "xno"; then

>          ODP_ABI_COMPAT=0

>          abi_compat=no

> +       enable_shared=no

>       fi])

>   AC_SUBST(ODP_ABI_COMPAT)

>

> @@ -336,6 +334,7 @@ AC_MSG_RESULT([

>          static libraries:       ${enable_static}

>          shared libraries:       ${enable_shared}

>          ABI compatible:         ${abi_compat}

> +       ODP_ABI_COMPAT:         ${ODP_ABI_COMPAT}

>          cunit:                  ${cunit_support}

>          test_vald:              ${test_vald}

>          test_perf:              ${test_perf}

ok -> v7
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index be5a292..7becc2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,13 +241,11 @@  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
 ODP_ABI_COMPAT=1
 abi_compat=yes
 AC_ARG_ENABLE([abi-compat],
-    [  --enable-abi-compat     build all targets in ABI compatible
mode (default=yes)],
-    [if test "x$enableval" = "xyes"; then
-       ODP_ABI_COMPAT=1
-       abi_compat=yes
-     else
+    [  --disable-abi-compat     disables ABI compatible mode, enables
inline code in header files],
+    [if test "x$enableval" = "xno"; then
        ODP_ABI_COMPAT=0
        abi_compat=no
+       enable_shared=no
     fi])