diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2021-10-10 21:43:26 +0200 |
---|---|---|
committer | Marcus Meissner <meissner@suse.de> | 2021-10-11 09:35:56 +0200 |
commit | 4002477b54cff0f459abb157d5f70fe2c2a15d5f (patch) | |
tree | 8d23913bf1dce4bbdbed25031e13dd37d9bc6e31 /gphoto-m4 | |
parent | 45cd04e32959fbeadd5442e44f89d5b9435ca140 (diff) | |
download | libgphoto2-4002477b54cff0f459abb157d5f70fe2c2a15d5f.tar.gz |
Use common code for defining iolibdir and camlibdir
Use a common m4 macro GP_DRIVERDIR for defining iolibdir and IOLIBS
in libgphoto2_port and camlibdir and CAMLIBS in libgphoto2.
Diffstat (limited to 'gphoto-m4')
-rw-r--r-- | gphoto-m4/Makefile-files | 1 | ||||
-rw-r--r-- | gphoto-m4/gp-driverdir.m4 | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gphoto-m4/Makefile-files b/gphoto-m4/Makefile-files index c43c8b82e..f0f4c4708 100644 --- a/gphoto-m4/Makefile-files +++ b/gphoto-m4/Makefile-files @@ -11,6 +11,7 @@ EXTRA_DIST += %reldir%/gp-check-popt.m4 EXTRA_DIST += %reldir%/gp-check-shell-environment.m4 EXTRA_DIST += %reldir%/gp-config-msg.m4 EXTRA_DIST += %reldir%/gp-documentation.m4 +EXTRA_DIST += %reldir%/gp-driverdir.m4 EXTRA_DIST += %reldir%/gp-dynamic-libraries.m4 EXTRA_DIST += %reldir%/gp-gettext-hack.m4 EXTRA_DIST += %reldir%/gp-internal-docs.m4 diff --git a/gphoto-m4/gp-driverdir.m4 b/gphoto-m4/gp-driverdir.m4 new file mode 100644 index 000000000..000a75935 --- /dev/null +++ b/gphoto-m4/gp-driverdir.m4 @@ -0,0 +1,31 @@ +dnl ################################################################### +dnl Driver directory (camlibdir or iolibdir) +dnl ################################################################### +dnl +dnl Usage: +dnl GP_DRIVERDIR([camlibdir], [CAMLIBS], [camlibs]) +dnl GP_DRIVERDIR([iolibdir], [IOLIBS], [iolibs]) +dnl +dnl ################################################################### +dnl +AC_DEFUN([GP_DRIVERDIR], [dnl +AC_MSG_CHECKING([where to install ][$3]) +AC_ARG_WITH([$1], [AS_HELP_STRING( + [--with-][$1][=<path>], + [install ][$3][ in directory <path>])dnl +], [ + $1="$withval" +], [ + $1="\${libdir}/${PACKAGE_TARNAME}/${PACKAGE_VERSION}" +]) +AC_MSG_RESULT([${$1}]) +AC_SUBST([$1]) +AM_CPPFLAGS="$AM_CPPFLAGS -D$2=\\\"${$1}\\\"" +])dnl +dnl +dnl +dnl #################################################################### +dnl +dnl Local Variables: +dnl mode: autoconf +dnl End: |