summaryrefslogtreecommitdiff
path: root/gphoto-m4
Commit message (Collapse)AuthorAgeFilesLines
* Only use a single gphoto-m4/ subdirHans Ulrich Niedermann2021-11-0735-5018/+0
| | | | | | | | | | | | | | | Only use a single gphoto-m4/ subdir - namely that in libgphoto2_port/gphoto-m4/. This prevents us from needing to synchronize the contents of the gphoto-m4/ and the libgphoto2_port/gphoto-m4/ directories. 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).
* make gphoto-m4 directories identicalHans Ulrich Niedermann2021-11-071-0/+4
| | | | | Make the two gphoto-m4 directories identical in preparation for using just one of them.
* Consistent checks for asm .symver and version-scriptHans Ulrich Niedermann2021-11-073-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same checks for asm .symver and -Wl,--version-script support for both libgphoto2.la and libgphoto2_port.la. This also reorganizes the Makefile.am files for libgphoto2.la and libgphoto2_port.la so that things belonging together are actually grouped together, so that inconsistencies can become more visible. This does not change what actually happens with when linking the libraries: * libgphoto2.la is still linked with just a --export-symbols libgphoto2.sym list of exported symbols. * libgphoto2_port.la is still linked with a -Wl,--version-script=libgphoto2_port.ver version script. However, the two library Makefile.am are now organized in such a way that you can actually see that. We should examine what those two symbol export methods actually do on Linux/ELF (complete support for version script semantics), and on non-ELF systems such as MacOSX dylib or Windows DLL.
* Use m4_pattern_forbid to find unnoticed GP_ stringsHans Ulrich Niedermann2021-11-032-2/+4
| | | | | Use m4_pattern_forbid to find unnoticed GP_ strings in the configure and config.status scripts.
* Update the checks for libjpeg (GP_LIBJPEG)Hans Ulrich Niedermann2021-11-032-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the checks for libjpeg to try libjpeg.pc with PKG_CHECK_MODULES first, and also to allow explicitly set LIBJPEG_CFLAGS and LIBJPEG_LIBS. The old detection logic 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. This mentions more information in the configure summary if not building with libjpeg. This is the first time we make it possible to build with libjpeg from e.g. FreeBSD ports' or MacOS homebrew's jpeg-turbo packages.
* Update libltdl checks (GP_LIBLTDL)Hans Ulrich Niedermann2021-11-031-38/+106
| | | | | | | | | | 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 third 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 or OSX/homebrew.
* Make the compiler warnings work with clang, gcc, and othersHans Ulrich Niedermann2021-11-031-11/+97
| | | | | | | | | | | | | | | | | | | | | | Make the compiler warnings work with clang in addition to gcc by test compiling all warning options before actually using them. This came up when 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 (clang, gcc, or whatever) actually supports. As running configure now checks whether compiling is possible for each warning flag, this should not introduce compatibility issues where builds which used to work now fail to build. However, you can always opt to not use the generated CFLAGS by setting CFLAGS to empty or whatever else you want when running your build, e.g. like make all check CFLAGS=
* gp-camlibs.m4: Fix GP_SLEEP invocation in in Gentoo hackHans Ulrich Niedermann2021-11-031-2/+3
| | | | | | | | Fix the GP_SLEEP invocation in the Gentoo hack warning which adds the ptp2 camlib if the only camlib requested is canon, as modern Canon cameras use the ptp2 camlib, not the canon camlib. Also syncs gphoto-m4/gp-camlibs.m4 to libgphoto2-port/gphoto-m4/.
* Factor out i18n stuff into separate i18n.h filesHans Ulrich Niedermann2021-10-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the i18n definitions into i18n.h include files: One include file each for libgphoto2 and for libgphoto2_port. This removes the complete #ifdef ENABLE_NLS # include <libintl.h> # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define _(String) (String) # define N_(String) (String) #endif block (which in some occasions defines even more macros) and replaces it with a single line #include "libgphoto2/i18n.h" for camlibs and libgphoto2 itself and with #include "libgphoto2_port/i18n.h" for iolibs and libgphoto2_port itself. This gives us two central locations to change the defintions.
* sync gp-check-library.m4 between gphoto-m4 dirsHans Ulrich Niedermann2021-10-251-0/+7
| | | | | | | | | | | The gphoto-m4 gp-check-library.m4 has been using PKG_PROG_PKG_CONFIG since commit c1ab67b7288359066b4884d3058e712f6170da35 (2017-08-29), so this makes the libgphoto2_port/gphoto-m4 use the same code. As PKG_PROG_PKG_CONFIG provided by pkg-config's pkg.po, this means we now require that to be present - and we should better check at autoreconf time that the PKG_PROG_PKG_CONFIG macro is actually defined.
* Here document: Use <<EOF everywhereHans Ulrich Niedermann2021-10-251-9/+8
| | | | | | | | Using EOF does the job, is well readable, and there is just no reason to use any other string. On the contrary, it may cause additional trouble when using m4_pattern_forbid.
* Remove rpm packagingHans Ulrich Niedermann2021-10-191-22/+0
| | | | | | | | | | While adding support for "make rpm" appeared to be a good idea in the early 2000s, it really is not and only clutters up the build system. At least the libgphoto2_port translation cannot have worked in the rpm package since at least 5255d802102c10f971dc98f10828451d9922340d from 2007-10-28, so it is a good guess that this has not really been in use.
* Use && and || instead of test arguments -a and -oHans Ulrich Niedermann2021-10-191-1/+1
| | | | | For portability, use && and || instead of the test arguments -a and -o.
* Remove unused remnants of convenience libltdlHans Ulrich Niedermann2021-10-192-61/+0
| | | | | | Not that its presence hurt anything, but we could have removed the libltdlc.la stuff some time in the 2000s.
* Fix check output for DEFAULT_CAMLIBS and DEFAULT_IOLIBSHans Ulrich Niedermann2021-10-121-1/+2
| | | | | | | | Fix the output configure prints about DEFAULT_CAMLIBS and DEFAULT_IOLIBS. This only affects the output configure prints, no actual config changes are happening.
* Replace --with-foodir= argument by foodir= variableHans Ulrich Niedermann2021-10-111-6/+43
| | | | | | | | | | | | | | | | | | | | | | This improves the definition of the camlib and iolib compile time install location and the runtime lookup location to use the same mechanism of using variables. Example uses for Windows builds using the default install location: ./configure \ DEFAULT_CAMLIBS='./libgphoto2' \ DEFAULT_IOLIBS='./libgphoto2_port' Or example use for explicitly defining the install location as well: ./configure \ camlibdir='/path/to/camlibs' \ DEFAULT_CAMLIBS='./libgphoto2' \ iolibdir='/path/to/iolibs' \ DEFAULT_IOLIBS='./libgphoto2_port'
* Make CAMLIBS and IOLIBS fallbacks configurableHans Ulrich Niedermann2021-10-111-5/+15
| | | | | | | | | | | | | | | | | | | | | | | Make CAMLIBS and IOLIBS fallback locations (where libgphoto2 looks for camlibs at runtime if the CAMLIBS environment variable is not set, and where libgphoto2_port looks for iolibs at runtime if the IOLIBS environment variable is not set) configurable at configure time. The runtime lookup location DEFAULT_CAMLIBS and DEFAULT_IOLIBS can be set independently from the installation location camlibdir and iolibdir. This is to accommodate systems like Windows where it apparently makes sense to install files to a location at build time which is different to where the files will eventually end up being used from: ./configure \ --with-camlibdir='/path/to/camlibs' \ DEFAULT_CAMLIBS='./libgphoto2' \ --with-iolibdir='/path/to/camlibs' \ DEFAULT_IOLIBS='./libgphoto2_port' As this interface is a bit ugly mixing the variables with the --with-argument, we will improve that in the next commit.
* Use common code for defining iolibdir and camlibdirHans Ulrich Niedermann2021-10-112-0/+32
| | | | | Use a common m4 macro GP_DRIVERDIR for defining iolibdir and IOLIBS in libgphoto2_port and camlibdir and CAMLIBS in libgphoto2.
* utf-8: fix weird minus/hyphen characterHans Ulrich Niedermann2021-10-091-1/+1
| | | | | I have no idea how that non-ASCII hyphen character made its way into that m4 file, but this returns a simple ASCII character.
* Fix typos found by codespell in *.m4Hans Ulrich Niedermann2021-02-282-2/+2
| | | | See https://github.com/gphoto/libgphoto2-python/issues/4
* Remove stdint.h shim (#625)Zeranoe2021-02-223-734/+1
| | | stdint.h has wide adoption at this point, so it should be safe to use.
* added a GP_CONDITIONAL_COMPILE_FLAGS export, so we can easily add warning ↵Marcus Meissner2020-08-311-4/+5
| | | | options
* Fix typos throughout the codebaseSijawusz Pur Rahnama2020-05-254-4/+4
|
* replace old digicam url by gphoto.org doc urlMarcus Meissner2020-02-241-1/+1
| | | | fixes https://github.com/gphoto/libgphoto2/issues/475
* Use standard syntax for the AC_DEFUN()ed macrosHans Ulrich Niedermann2020-02-191-6/+9
|
* Fix _GP_EOF m4_pattern bug introduced in 6f65d24796aHans Ulrich Niedermann2020-02-191-2/+0
| | | | Fixes: 6f65d24796a0aaca0c20f4c074aa71e39f38e68d
* Make sure both C and C++ programs including gphoto2 headers compileHans Ulrich Niedermann2020-02-191-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that programs including libgphoto2 headers compile when compiled for a number of different language standards: C: ansi c99 c11 C++: ansi c++98 c++11 c++14 c++17 For each of these language standards, if the compiler does not compile an empty example program, we do not test whether compiling with the gphoto2/*.h headers included works. This will work with GCC as the compiler, and also should work with CLANG as the compiler as CLANG is mostly compatible in these matters. On other compilers, the test compile of the empty program should fail, and thus no checks with the gphoto2/*.h headers included will be performed. C90/ANSI C apparently does not define __STDC_VERSION__, so the C source code needed to be changed to become ANSI C compatible. In C++ pedantic compilation source, we now use actual C++ code instead of relying on C code working when compiled as C++ code. In Travis CI, we now actually require both C and C++.
* configure: Set SLEEP=no now to disable warning sleepsHans Ulrich Niedermann2020-02-193-5/+39
| | | | | | | | | Allow setting SLEEP=no to disable sleep on warnings like ../configure SLEEP=no --prefix=/foo/bar ... This is implemented with GP_SLEEP and gp_sleep similar to m4sh's AS_ECHO and $as_echo.
* New set based camlib definition and --with-camlibs handlingHans Ulrich Niedermann2020-02-173-136/+1292
| | | | | | | | | | | | | | This uses proper set operations both for GP_CAMLIB and for handling the --with-camlibs value. This allows all GP_CAMLIB definitions to be present at autoreconf time (as m4 code) time while some camlib definitions being conditional at the time of the configure run (in the sh code). The ./configure output is still a bit verbose, but we can reduce that verbosity later when we have found out that this works well on people's different systems. Fixes: https://github.com/gphoto/libgphoto2/issues/467
* fix the m4 macroMarcus Meissner2019-05-041-3/+4
|
* allow obsoleting camlibs, while still building them.Marcus Meissner2019-05-041-14/+36
| | | | Tag a lot of camlibs as obsolete / outdated
* added missing htole64Marcus Meissner2018-03-301-0/+4
| | | | fixes https://github.com/gphoto/libgphoto2/issues/244
* do not ship gp-pkg-config (dropped)Marcus Meissner2017-10-021-1/+0
|
* remove gp_pkg_config macro, replace by standard pkg-config macroMarcus Meissner2017-08-292-43/+1
|
* synchronize gphoto-m4 filesHans Ulrich Niedermann2017-07-207-17/+797
|
* switch to github urlMarcus Meissner2015-11-011-1/+1
|
* imported the libgphoto m4 treeMarcus Meissner2015-08-0128-0/+3315