Message405780
The autoconf-based build system has room for improvements. The configure.ac script can be simplified in several places by using AS and AC macros or by defining new custom macros.
For example we have a lot of blocks that look like this:
AC_MSG_CHECKING(for chroot)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void x=chroot]])],
[AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
])
The block has an issue, too. It does not use AC_CACHE to cache the result. The entire block can be replaced by a custom macro that takes care of everything and implements correct caching:
PY_CHECK_FUNC([chroot], [#include <unistd.h>])
We can also move several library and header checks from setup.py into configure.ac, e.g. check for soundcard.h or gdbm libs and headers. |
|
Date |
User |
Action |
Args |
2021-11-05 10:05:47 | christian.heimes | set | recipients:
+ christian.heimes |
2021-11-05 10:05:47 | christian.heimes | set | messageid: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> |
2021-11-05 10:05:47 | christian.heimes | link | issue45723 messages |
2021-11-05 10:05:46 | christian.heimes | create | |
|