public inbox for annobin@sourceware.org
 help / color / mirror / Atom feed
* configure script issues
@ 2024-02-29 15:53 Christian Tramnitz
  2024-02-29 16:24 ` configure script issue Christian Tramnitz
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Tramnitz @ 2024-02-29 15:53 UTC (permalink / raw)
  To: annobin

Hello,

I'm trying to package annobin for Gentoo and stumbled upon an
unexpected behaviour during configure.

When `--without-clang` or `--without-llvm` are passed to configure,
this seems to be interpreted as "with" instead of "without". Omitting
each disables them as per defaults.

I'm not an autoconf pro, but I think there is some inconsistency
between with_clang / with_clang_plugin and with_llvm /
with_llvm_plugin and maybe their default values in the configure
script.
You'll only notice when explicitly trying to turn them off (which is
the default already) so noone may have noticed yet.


BR,
   Christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* configure script issue
  2024-02-29 15:53 configure script issues Christian Tramnitz
@ 2024-02-29 16:24 ` Christian Tramnitz
  2024-03-01 11:48   ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Tramnitz @ 2024-02-29 16:24 UTC (permalink / raw)
  To: annobin

Hello,

I'm trying to package annobin for Gentoo and stumbled upon an
unexpected behavior during configure.

When `--without-clang` or `--without-llvm` are passed to configure,
this seems to be interpreted as "with" instead of "without". Omitting
each disables them as per defaults.

I'm not an autoconf pro, but I think there is some inconsistency
between with_clang / with_clang_plugin and with_llvm /
with_llvm_plugin and maybe their default values in the configure
script.

You'll only notice when explicitly trying to turn them off (which is
the default already).


BR,
   Christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: configure script issue
  2024-02-29 16:24 ` configure script issue Christian Tramnitz
@ 2024-03-01 11:48   ` Nick Clifton
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2024-03-01 11:48 UTC (permalink / raw)
  To: Christian Tramnitz, annobin

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

Hi Christian,

> When `--without-clang` or `--without-llvm` are passed to configure,
> this seems to be interpreted as "with" instead of "without". Omitting
> each disables them as per defaults.

Ooops!

> I'm not an autoconf pro, but I think there is some inconsistency
> between with_clang / with_clang_plugin and with_llvm /
> with_llvm_plugin and maybe their default values in the configure
> script.

Agreed.

Please could you try out the attached patch and let me know if it
works for you ?

It should harmonize the configure options, so that by default
everything is built and that in order to disable a component you
need to add --without-<name> to the command line.  Plus the names
for the plugin options are now consistent, ie --without-gcc-plugin
--without-clang-plugin and --without-llvm-plugin.

Cheers
   Nick

[-- Attachment #2: annobin.configure.patch --]
[-- Type: text/x-patch, Size: 7559 bytes --]

diff --git a/config/annocheck.m4 b/config/annocheck.m4
index 3872fe7..96bee23 100644
--- a/config/annocheck.m4
+++ b/config/annocheck.m4
@@ -34,9 +34,9 @@ AC_SUBST(RPMLIBS)
 AC_DEFUN([BUILD_CLANG_PLUGIN], [
 
 AC_ARG_WITH(
-  [clang],
-  [AC_HELP_STRING([--with-clang],[build the clang plugin])],
-  [with_clang_plugin=yes],
+  [clang-plugin],
+  [AC_HELP_STRING([--without-clang-plugin],[do not build the clang plugin])],
+  [with_clang_plugin=no],
   [:])
 ])
 
@@ -52,9 +52,9 @@ AC_ARG_WITH(
 AC_DEFUN([BUILD_LLVM_PLUGIN], [
 
 AC_ARG_WITH(
-  [llvm],
-  [AC_HELP_STRING([--with-llvm],[build the llvm plugin])],
-  [with_llvm_plugin=yes],
+  [llvm-plugin],
+  [AC_HELP_STRING([--without-llvm-plugin],[do not build the llvm plugin])],
+  [with_llvm_plugin=no],
   [:])
 ])
 
diff --git a/configure b/configure
index 6fde8cf..0809afc 100755
--- a/configure
+++ b/configure
@@ -800,9 +800,9 @@ with_sysroot
 enable_libtool_lock
 with_annocheck
 with_libelf
-with_clang
+with_clang_plugin
 with_gcc_plugin
-with_llvm
+with_llvm_plugin
 with_docs
 enable_maintainer_mode
 with_gcc_plugin_dir
@@ -1472,9 +1472,9 @@ Optional Packages:
                           compiler's sysroot if not specified).
   --without-annocheck     do not build annocheck
   --without-libelf        remove libelf dependency
-  --with-clang            build the clang plugin
+  --without-clang-plugin  do not build the clang plugin
   --without-gcc_plugin    do not build the gcc plugin
-  --with-llvm             build the llvm plugin
+  --without-llvm-plugin   do not build the llvm plugin
   --without-docs          do not build the documentation
   --with-gcc-plugin-dir=DIR
                           install annobin plugin into the GCC plugin directory
@@ -17971,9 +17971,9 @@ fi
 
 
 
-# Check whether --with-clang was given.
-if test "${with_clang+set}" = set; then :
-  withval=$with_clang; with_clang_plugin=yes
+# Check whether --with-clang-plugin was given.
+if test "${with_clang_plugin+set}" = set; then :
+  withval=$with_clang_plugin; with_clang_plugin=no
 else
   :
 fi
@@ -17995,9 +17995,9 @@ fi
 
 
 
-# Check whether --with-llvm was given.
-if test "${with_llvm+set}" = set; then :
-  withval=$with_llvm; with_llvm_plugin=yes
+# Check whether --with-llvm-plugin was given.
+if test "${with_llvm_plugin+set}" = set; then :
+  withval=$with_llvm_plugin; with_llvm_plugin=no
 else
   :
 fi
@@ -18502,7 +18502,7 @@ else
   COND_ANNOCHECK_FALSE=
 fi
 
- if test "$with_clang_plugin" == yes; then
+ if test "$with_clang_plugin" != no; then
   COND_CLANG_TRUE=
   COND_CLANG_FALSE='#'
 else
@@ -18518,7 +18518,7 @@ else
   COND_GCC_PLUGIN_FALSE=
 fi
 
- if test "$with_llvm_plugin" == yes; then
+ if test "$with_llvm_plugin" != no; then
   COND_LLVM_TRUE=
   COND_LLVM_FALSE='#'
 else
@@ -18550,7 +18550,7 @@ if test "$with_annocheck" != no; then
   ac_config_files="$ac_config_files annocheck/Makefile"
 
 fi
-if test "$with_clang" = yes; then
+if test "$with_clang_plugin" != no; then
   ac_config_files="$ac_config_files clang-plugin/Makefile"
 
 fi
@@ -18558,7 +18558,7 @@ if test "$with_gcc_plugin" != no; then
   ac_config_files="$ac_config_files gcc-plugin/Makefile"
 
 fi
-if test "$with_llvm" = yes; then
+if test "$with_llvm_plugin" != no; then
   ac_config_files="$ac_config_files llvm-plugin/Makefile"
 
 fi
diff --git a/configure.ac b/configure.ac
index 24210c2..39c3494 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,9 +155,9 @@ AC_TYPE_UINT64_T
 AM_CONDITIONAL([COND_DOCS],       [test "$with_docs" != no])
 AM_CONDITIONAL([COND_TESTS],      [test "$with_tests" != no])
 AM_CONDITIONAL([COND_ANNOCHECK],  [test "$with_annocheck" != no])
-AM_CONDITIONAL([COND_CLANG],      [test "$with_clang_plugin" == yes])
+AM_CONDITIONAL([COND_CLANG],      [test "$with_clang_plugin" != no])
 AM_CONDITIONAL([COND_GCC_PLUGIN], [test "$with_gcc_plugin" != no])
-AM_CONDITIONAL([COND_LLVM],       [test "$with_llvm_plugin" == yes])
+AM_CONDITIONAL([COND_LLVM],       [test "$with_llvm_plugin" != no])
 
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES(annobin-global.h)
@@ -175,13 +175,13 @@ fi
 if test "$with_annocheck" != no; then
   AC_CONFIG_FILES(annocheck/Makefile)
 fi
-if test "$with_clang" = yes; then
+if test "$with_clang_plugin" != no; then
   AC_CONFIG_FILES(clang-plugin/Makefile)
 fi
 if test "$with_gcc_plugin" != no; then
   AC_CONFIG_FILES(gcc-plugin/Makefile)
 fi
-if test "$with_llvm" = yes; then
+if test "$with_llvm_plugin" != no; then
   AC_CONFIG_FILES(llvm-plugin/Makefile)
 fi
 
diff --git a/doc/annobin.info b/doc/annobin.info
index d8caa4e..9232dd9 100644
--- a/doc/annobin.info
+++ b/doc/annobin.info
@@ -1,4 +1,4 @@
-This is annobin.info, produced by makeinfo version 7.0.2 from
+This is annobin.info, produced by makeinfo version 7.0.3 from
 annobin.texi.
 
 This file documents the annobin plugin on the Fedora system.
@@ -3244,13 +3244,13 @@ configure options available to customise the build:
 ‘--without-tests’
      Disable running the testsuite after building the various binaries.
 
-‘--with-clang’
-     Enable the building of the annobin plugin for the Clang compiler.
+‘--without-clang-plugin’
+     Disable the building of the annobin plugin for the Clang compiler.
 
-‘--with-llvm’
-     Enable the building of the annobin plugin for the LLVM compiler
-     backend.  This is separate from the Clang plugin and can be used
-     with any language that uses LLVM as a backend compiler.
+‘--without-llvm-plugin’
+     Disable the building of the annobin plugin for the LLVM compiler
+     backend.  The LLVM plugin is separate from the Clang plugin and can
+     be used with any language that uses LLVM as a backend compiler.
 
 ‘--without-gcc-plugin’
      Do not build the gcc plugin.
@@ -4267,12 +4267,12 @@ Node: libannocheck_enable_profile\x7f130074
 Node: libannocheck_get_known_profiles\x7f130596
 Node: libannocheck_run_tests\x7f131299
 Node: Configure Options\x7f132148
-Node: Legacy Scripts\x7f134586
-Node: Who Built Me\x7f135369
-Node: ABI Checking\x7f138260
-Node: Hardening Checks\x7f140507
-Node: Checking Archives\x7f144855
-Node: GNU FDL\x7f147408
+Node: Legacy Scripts\x7f134619
+Node: Who Built Me\x7f135402
+Node: ABI Checking\x7f138293
+Node: Hardening Checks\x7f140540
+Node: Checking Archives\x7f144888
+Node: GNU FDL\x7f147441
 \x1f
 End Tag Table
 
diff --git a/doc/annobin.texi b/doc/annobin.texi
index f3917ac..d5dd0a0 100644
--- a/doc/annobin.texi
+++ b/doc/annobin.texi
@@ -3465,13 +3465,13 @@ it would normally be detected.
 @item --without-tests
 Disable running the testsuite after building the various binaries.
 
-@item --with-clang
-Enable the building of the annobin plugin for the Clang compiler.
+@item --without-clang-plugin
+Disable the building of the annobin plugin for the Clang compiler.
 
-@item --with-llvm
-Enable the building of the annobin plugin for the LLVM compiler
-backend.  This is separate from the Clang plugin and can be used with
-any language that uses LLVM as a backend compiler.
+@item --without-llvm-plugin
+Disable the building of the annobin plugin for the LLVM compiler
+backend.  The LLVM plugin is separate from the Clang plugin and can be
+used with any language that uses LLVM as a backend compiler.
 
 @item --without-gcc-plugin
 Do not build the gcc plugin.
@@ -3479,6 +3479,9 @@ Do not build the gcc plugin.
 @item --without-docs
 Do not build the documentation.
 
+@item --without-annocheck
+Do not build the annocheck tool.
+
 @item --enable-maintainer-mode
 This enables the regeneration of the @file{Makefile} and
 @file{configure} files when building the @code{annobin} sources.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-01 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 15:53 configure script issues Christian Tramnitz
2024-02-29 16:24 ` configure script issue Christian Tramnitz
2024-03-01 11:48   ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).