This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Thank you very much, Mike! I should have been more careful. What about this variant? diff --git a/configure.ac b/configure.ac index 826e644..37ce12c 100644 --- a/configure.ac +++ b/configure.ac @@ -24,9 +24,28 @@ AC_CONFIG_FILES([config/Makefile]) AC_COPYRIGHT([Copyright (C) 1996-2010 Red Hat, Inc.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required. +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip]) -AM_MAINTAINER_MODE + +dnl If autogenerated files are absent, set maintainer mode to recreate them +case "${target_cpu}" in + i*86|x86_64) + if test ! -f ${srcdir}/libcpu/i386_dis.h; then + use_maintainer_mode=enable + elif test ! -f ${srcdir}/libcpu/x86_64_dis.h; then + use_maintainer_mode=enable + fi + ;; +esac +if test -z "$use_maintainer_mode"; then + AM_MAINTAINER_MODE +else + AM_MAINTAINER_MODE(enable) + AC_MSG_WARN([Maintainer mode is turned on as libcpu files not found]) +fi dnl Unique ID for this build. MODVERSION="Build on $(hostname) $(date +%FT%R:%S%z)" @@ -44,9 +63,6 @@ AC_CONFIG_FILES([m4/Makefile]) dnl The RPM spec file. We substitute a few values in the file. AC_CONFIG_FILES([elfutils.spec:config/elfutils.spec.in]) - -AC_CANONICAL_HOST - AC_ARG_ENABLE([thread-safety], AS_HELP_STRING([--enable-thread-safety], [enable thread safety of libraries]), use_locks=$enableval, use_locks=no) As I understand these files (*_dis.h) are needed only for Intel platform? Thanks, --Serge 2011/12/7 Mike Frysinger <vapier@gentoo.org> > On Tuesday 06 December 2011 04:14:27 Serge Pavlov wrote: > > --- a/configure.ac > > +++ b/configure.ac > > > > +if [ test -f libcpu/i386_dis.h ]; then > > issues: > - don't use the brackets as those are m4 quotes and will get removed, and > if > they weren't, it's invalid shell anyways: > if [ test -f foo ] ; then > - this doesn't work for out of tree builds as you need to be checking > $srcdir > - you probably should add an AC_MSG_WARNING that it was enabled, and why > > > +if [ -z "$use_maintainer_mode" ]; then > > test -z "$use_maintainer_mode" > -mike >
On Tuesday 06 December 2011 04:14:27 Serge Pavlov wrote:
> --- a/configure.ac
> +++ b/configure.ac
>issues:
> +if [ test -f libcpu/i386_dis.h ]; then
- don't use the brackets as those are m4 quotes and will get removed, and if
they weren't, it's invalid shell anyways:
if [ test -f foo ] ; then
- this doesn't work for out of tree builds as you need to be checking $srcdir
- you probably should add an AC_MSG_WARNING that it was enabled, and why
> +if [ -z "$use_maintainer_mode" ]; then
test -z "$use_maintainer_mode"
-mike
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |