Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

improved configure script #4752

Closed
wzdev-ci opened this issue Feb 22, 2018 · 16 comments
Closed

improved configure script #4752

wzdev-ci opened this issue Feb 22, 2018 · 16 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by Forgon


When executing ./configure, the following warning was printed:

./configure: line 6278: AX_C___BUILTIN_EXPECT: command not found

This was caused by the AX_C___ATTRIBUTE__ macro being deprecated. It had been introduced in

`
commit 9356cc13d3befa7e35eacd6366cf5a1710f395b8
Author: Per Inge Mathisen per@wz2100.net
Date: Sun Oct 7 18:34:32 2012 +0200

Annotate asserts with !__builtin_expect. This closes #3541

'

It could be replaced with the macro AX_GCC_BUILTIN(BUILTIN), but this fails for older gcc versions.

Instead, we use this custom routine to check for the existence of function '!__builtin_expect()', which was inspired by literally copied from gperftool's configure script.

AC_MSG_CHECKING([for __builtin_expect()])
AC_LINK_IFELSE([AC_LANG_PROGRAM(, return __builtin_expect(main != 0, 1))],
		[AC_DEFINE(HAVE_BUILTIN_EXPECT, 1,
		Define to 1 if compiler supports __builtin_expect)
		AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])

Running ./configure without specifying a distributor resulted in the following warning:

WARNING: Distributor unknown!
Use --with-distributor when compiling package for distribution

Since distributor names are seldom necessary, that warning was replaced with a message if one was given. For instance, executing ./configure --with-distributor=Forgon2100 will print:

*** Distributor Forgon2100 ***

Issue migrated from trac:4752 at 2022-04-16 13:03:40 -0700

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file distributor_name.patch (0.9 KiB)

patch file created with git format-patch (part 2/2)

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file configure_error.log (6.6 KiB)

complete command line output of ./configure before applying this patch series

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed owner from `` to Forgon2100 <forgon2100@gmail.com>

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> committed [8]


In Warzone2100/warzone2100@8ad8477:

#CommitTicketReference repository="" revision="8ad84771458e0ee3890ffa035cc6447fa7e9cbc6"
fixes #4752: replaced deprecated macro AX_C___BUILTIN_EXPECT with AX_GCC_BUILTIN(__builtin_expect) (patch 1/2)

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> committed [5]


In Warzone2100/warzone2100@5ed40f3:

#CommitTicketReference repository="" revision="5ed40f3153cad4b983a473add191fcb7724416a2"
fixes #4752: replaced warning if no distributor name was given with message if distributor name was given (patch 2/2)

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> committed [203]


In Warzone2100/warzone2100@203d267:

#CommitTicketReference repository="" revision="203d26713d5df6deca54d9b88625d998b50f9a6a"
Revert "fixes #4752: replaced deprecated macro AX_C___BUILTIN_EXPECT with AX_GCC_BUILTIN(__builtin_expect) (patch 1/2)"

This reverts commit 8ad84771458e0ee3890ffa035cc6447fa7e9cbc6.

@wzdev-ci
Copy link
Contributor Author

Forgon changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

Forgon changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

Forgon edited the issue description

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file configure_success.log (6.5 KiB)

complete command line output of ./configure --with-distributor-name=Forgon2100 after applying this patch series

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file deprecated_macro.patch (1.0 KiB)

patch file created with git format-patch (part 1/2)

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> commented


In Warzone2100/warzone2100@f7f4334:

#CommitTicketReference repository="" revision="f7f4334869eeaad243b734341908be50ddcba0a0"
fixes #4752: replaced deprecated macro AX_C___BUILTIN_EXPECT with custom check for function __builtin_expect() (patch 1/2)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant