-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge libgphoto2_port buildsystem into the libgphoto2 buildsystem #731
base: master
Are you sure you want to change the base?
Conversation
91df327
to
459e7d9
Compare
226eaea
to
cf50ed6
Compare
As of cf50ed6, this needs probably another 20 to 30 commits until the actual merge, and then another 10 to clean up the merge fallout. Still working on this in the background, occasionally committing smaller independent issues I have run into directly to the master branch. |
Make the compiler warnings work with clang in addition to gcc. This came up then the pedantic build tests failed on FreeBSD 13. To achieve this, we add -Werror=unknown-warning-option to the CFLAGS for clang to abort immediately on encountering an unknown warning option. This means we now only add warnings which the compiler (both clang and gcc) actually supports. As configure tests that compiling is possible for each warning flag, this should not introduce compatibility issues where builds which used to work now do not. However, you can always opt to not use the generated CFLAGS by setting CFLAGS to empty when running your build like make all check CFLAGS=
These did not work with C++ on FreeBSD 13 anyway, due to c++98 not working there, which the old pedantic compilation just assumed was working without testing it in configure. The new pedantic compilation tests offer a multitude of language standards including c++98, but only tries building the pedantic compilation tests for those language standards for which configure has shown that building programs is possible at all.
Always define the test programs, but only conditionally test them. This makes certain they can be build, the sources are added to the dist tarball, etc.
Add a pedantic compile test for c++20 in addtion to the existing ones for c++98, c++11, c++14, and c++17.
Use m4_pattern_forbid to find unnoticed GP_ strings in the configure and config.status scripts.
We still do not use LTDL_INIT() as LTDL_INIT insists on us shipping libltdl sources in our release tarballs and we still do not like shipping 3rd party sources. This now checks locations other than the default include and linker paths, so that configure should find libltdl by itself now on e.g. FreeBSD.
Update the checks for jpeg-turbo libjpeg to try libjpeg.pc with PKG_CHECK_MODULES first, and also to allow explicitly set LIBJPEG_CFLAGS and LIBJPEG_LIBS. The old mechanism did not allow specifying the location of libjpeg at all. It only allowed either disabling libjpeg or using libjpeg from the default include and linker paths. So this also changes the places in the Makefiles where we used to add @LIBJPEG@ to the linker to both link with $(LIBJPEG_LIBS) and compile with $(LIBJPEG_CFLAGS). The new configure logic keeps --without-jpeg to force- disable libjpeg, but updates the detection of libjpeg to first try the LIBJPEG_* variables if given, otherwise try PKG_CHECK_MODULES for libjpeg, and only then falls back to the old way of just trying the default include and link locations for libjpeg. Also, this mentions more information in the configure summary if not building with libjpeg, and it makes sure to call libjpeg "jpeg-turbo libjpeg" to help people with finding the proper system package to install. This is the first time we make it possible to build with jpeg-turbo libjpeg on e.g. FreeBSD.
This makes changes easier to read in diffs.
This makes it easier to see and merge changes.
Occasionally, not quoting macro arguments leads to weird problems. So we try to consistently quote the arguments to avoid these kinds of problems.
This puts AM_PO_SUBDIRS before AM_GNU_GETTEXT to fix the error: `po-directories' is already registered with AC_CONFIG_COMMANDS. and puts the -DLOCALEDIR together with the gettext setup.
# Conflicts: # libgphoto2_port/configure.ac
Make the two gphoto-m4 directories identical in preparation for using just one of them.
Only use a single gphoto-m4/ subdir - namely that in libgphoto2_port/gphoto-m4/. This prevents us from needing to synchronize the *.m4 files. We can do that by switching from recursive make for the gphoto-m4 subdirectories to using include path/to/gphoto-m4/Makefile-files from both the top-level Makefile.am and libgphoto2_port/Makefile.am using %reldir% (introduced in automake 1.14).
This helps with editing the *.m4 files in the proper editor mode.
The "localedir" variable has been introduced by autoconf-2.59c. We are requiring at least autoconf-2.62, so we do not need to define and AC_SUBST "localedir" any more.
Fix the GP_SLEEP invocation in the Gentoo hack which adds the ptp2 camlib if the only camlib requested is canon, as modern Canon cameras use the ptp2 camlib, not the canon camlib.
This adds a list of tool releases with their respective release dates and why they are important for libgphoto2 (libexif requirements, notable bug fixes and features).
This gives us a few more features and bug fixes and fewer workarounds. autoconf 2.69 is the same autoconf version requirement as libexif uses. autoconf 2.69 has been released 2012-04-25. If you ever need to build a post 2021 libgphoto2 from git on a system with pre 2.69 autoconf, you can always prepare a tarball using "make dist" on a system with autoconf 2.69 or later, and build that tarball on the older machine.
This gives us a few more features, and a few less conditionals conditionally reimplementing features added to automake before automake 1.14. automake 1.14 is almost the same automake version requirement as libexif uses (libexif requires 1.14.1). automake 1.14 has been released 2013-06-20. If you ever need to build a post 2021 libgphoto2 from git on a system with pre 1.14 automake, you can can always prepare a tarball using "make dist" on a system with automake 1.14 or later, and build that tarball on the older machine.
Improves readability
Spacing improves readability.
Put one header file per line in the the argument to AC_CHECK_HEADERS(). This improves readability, makes diffs easier to read, allows for easier sorting, etc.
Put one function name per line in the the argument to AC_CHECK_FUNCS(). This improves readability, makes diffs easier to read, allows for easier sorting, etc.
This gives us a few more features and fixes to rely on which are present in libtool 2.4.2 (released 2011-10-18), which is older than our autoconf, automake, and gettext requirements. Update the libtool initialization to use the more modern (modern in the sense of libtool 1.9b from 2004-08-29) LT_INIT macro. We still do not use LTDL_INIT() as that insists on us shipping libltdl sources in our release tarballs.
cf50ed6
to
4a8e1ea
Compare
Actually unifying the two |
As PR #855 shows, unifying the two |
FTR, I am resuming work on this. |
Random thought from an outsider: maybe better replace the whole thing with e.g. CMake? That is at least my thought every time I look at my console while tons of 'noise' gets spit out by make and I have to scroll just to find some warnings... ;). Disclaimer: I have no idea how much work that would be, I'm just a happy CMake user in other projects. |
HELL NO |
Ah, someone who likes their autotools ;). Maybe you can help me solve my problem regarding the usability. Is there an autoconf/configure/make option to do away will all the noise and have a make run with a single compiler warning actually let me see that in my terminal window without scrolling 10 to 30 pages up? |
make --quiet already helps. |
Thanks for the hint, although it made no significant difference IMHO. But now I found |
this should be enabled by default. |
This will merge the
libgphoto2_port/configure.ac
and assorted files into the top-levelconfigure.ac
. The basic idea is to get bothconfigure.ac
andlibgphoto2_port/configure.ac
cleaned up first, both to refamiliarize myself with them and to make the later merge simpler. Only then will I do the actual merge.At this time, this is still work in progress. There will be force pushes for some time.
Changes and Features:
configure --help
will now print the help for thelibgphoto2_part
in addition to thelibgphoto2
part of the build.configure
should be faster.make dist
without updating all the*.po
files). Exact version TBD.Remarks: