diff options
Diffstat (limited to 'gphoto-m4/gp-camlibs.m4')
-rw-r--r-- | gphoto-m4/gp-camlibs.m4 | 557 |
1 files changed, 421 insertions, 136 deletions
diff --git a/gphoto-m4/gp-camlibs.m4 b/gphoto-m4/gp-camlibs.m4 index a7c82fe97..c798b4f71 100644 --- a/gphoto-m4/gp-camlibs.m4 +++ b/gphoto-m4/gp-camlibs.m4 @@ -1,191 +1,476 @@ +dnl #################################################################### +dnl dnl GP_CAMLIB & Co. dnl +dnl #################################################################### +dnl dnl Redundancy free definition of libgphoto2 camlibs. dnl dnl Removes the redundany from the camlib lists, and executes -dnl additional consistency checks, e.g. to ensure that subdirectories -dnl actually exist. +dnl additional consistency checks on the build system. +dnl +dnl Every camlib belongs to one of the following (disjunct) sets of +dnl camlibs: +dnl +dnl * the 'standard' set dnl -dnl You can mark camlibs as unlisted, i.e. they won't be listed -dnl explicitly but still be recognized. +dnl The set of camlibs which is most likely to support the most +dnl cameras. This is the default when --with-camlibs=... is not +dnl given. This used to be called 'all', even though it +dnl definitively does not comprise all camlibs. +dnl +dnl * the 'outdated' set +dnl +dnl These cameras are outdated in some way. The cameras may have +dnl fallen out of use, the camlib might have been superseded by +dnl another one, or other reasons. Not built by default. +dnl +dnl * the 'unlisted' set +dnl +dnl These camlibs will not be listed by './configure --help', but +dnl they can still be added to the set of camlibs to be built. dnl dnl Example usage: dnl dnl GP_CAMLIB([canon]) dnl GP_CAMLIB([casio]) dnl [...] +dnl AM_COND_IF([HAVE_LIBCURL], [dnl +dnl AM_COND_IF([HAVE_LIBXML2], [dnl +dnl GP_CAMLIB([lumix])dnl +dnl ]) +dnl ]) +dnl [...] dnl GP_CAMLIB([ptp],[unlisted]) dnl GP_CAMLIB([ptp2]) dnl [...] dnl GP_CAMLIB([toshiba]) -dnl GP_CAMLIBS_DEFINE([camlibs]) +dnl GP_CAMLIBS_DEFINE() dnl -dnl The camlibs basedir parameter of GP_CAMLIBS_DEFINE is optional. dnl dnl #################################################################### +dnl Implementation remarks +dnl #################################################################### +dnl +dnl Note that at this time, the set names are hard coded, but could be +dnl moved to a m4 time automatic set of set names at a later time. +dnl +dnl A few notes on macro and variable naming: +dnl +dnl * GP_* are the macros to be called from configure.ac +dnl * GP_CAMLIBS_* are also shell variables exported to configure.ac +dnl shell code and Makefile.am files +dnl * gp_m4_* are the macros used inside those macros as m4 variables +dnl * gp_sh_* are the shell variables used inside the GP_ shell code +dnl * The old, inconsistent names of the as untouched variables +dnl exported to configure.ac and Makefile.am are still inconsistent. +dnl dnl -AC_DEFUN([GP_CAMLIBS_INIT],[dnl +dnl #################################################################### +dnl Forbid everything first, allow specific variable names later +dnl #################################################################### +m4_pattern_forbid([GP_CAMLIBS_])dnl +m4_pattern_forbid([GP_CAMLIB_])dnl +dnl +dnl +dnl #################################################################### +dnl _GP_CAMLIBS_INIT +dnl Called internally when required. +dnl #################################################################### +AC_DEFUN_ONCE([_GP_CAMLIBS_INIT],[dnl +dnl # BEGIN $0($@) AC_BEFORE([$0],[GP_CAMLIB])dnl -m4_define_default([gp_camlib_srcdir], [camlibs])dnl -m4_define_default([gp_camlibs], [])dnl -m4_define_default([gp_camlibs_unlisted], [])dnl -m4_define_default([gp_camlibs_outdated], [])dnl +AC_REQUIRE([AC_PROG_GREP])dnl +AC_REQUIRE([AC_PROG_SED])dnl +AC_REQUIRE([GP_PROG_CMP])dnl +AC_REQUIRE([GP_PROG_SORT])dnl +AC_REQUIRE([GP_PROG_TR])dnl +AC_REQUIRE([GP_PROG_UNIQ])dnl +m4_foreach_w([var], [everything standard unlisted outdated], [dnl + m4_set_empty([gp_m4s_camlib_set_]var, [], [dnl + m4_errprintn([Error: non-empty set gp_m4s_camlib_set_]var[ already defined])dnl + m4_exit(1)dnl + ])dnl +])dnl +GP_SET_DEFINE([camlib-set-standard])dnl +GP_SET_DEFINE([camlib-set-unlisted])dnl +GP_SET_DEFINE([camlib-set-outdated])dnl +dnl # END $0($@) ])dnl dnl -dnl #################################################################### dnl +dnl #################################################################### +dnl GP_CAMLIB([mycamlib]) +dnl GP_CAMLIB([mycamlib], [outdated]) +dnl Add the camlib 'mycamlib' to the "standard" set of camlibs or +dnl the "outdated" set of camlibs, respectively. +dnl #################################################################### +m4_pattern_forbid([GP_CAMLIB])dnl AC_DEFUN([GP_CAMLIB],[dnl -AC_REQUIRE([GP_CAMLIBS_INIT])dnl +dnl # BEGIN $0($@) +AC_REQUIRE([_GP_CAMLIBS_INIT])dnl AC_BEFORE([$0],[GP_CAMLIBS_DEFINE])dnl -m4_if([$2],[unlisted],[dnl -# $0($1,$2) -m4_append([gp_camlibs_unlisted], [$1], [ ])dnl -], -[$2],[outdated],[dnl -# $0($1,$2) -m4_append([gp_camlibs_outdated], [$1], [ ])dnl -], -[$#],[1],[dnl -# $0($1) -m4_append([gp_camlibs], [$1], [ ])dnl -],[dnl -m4_errprint(__file__:__line__:[ Error: -*** Illegal parameter 2 to $0: `$2' -*** Valid values are: undefined, [unlisted] or [outdated] -])dnl +m4_case([$#],[2],[dnl + m4_case([$2], [unlisted], [dnl + GP_SET_ADD([camlib-set-unlisted], [$1]) + m4_set_add([gp_m4s_camlib_set_unlisted], [$1])dnl + ], [outdated], [dnl + GP_SET_ADD([camlib-set-outdated], [$1]) + m4_set_add([gp_m4s_camlib_set_outdated], [$1])dnl + ], [dnl + m4_errprintn(__file__:__line__:[ Error: Wrong second argument to GP_CAMLIB])dnl + m4_exit(1)dnl + ])dnl +], [1], [dnl + GP_SET_ADD([camlib-set-standard], [$1]) + m4_set_add([gp_m4s_camlib_set_standard], [$1])dnl +], [dnl + m4_errprintn(__file__:__line__:[ Error: Wrong number of arguments to GP_CAMLIB])dnl + m4_exit(1)dnl +])dnl m4_case $# +m4_set_add([gp_m4s_camlib_set_everything], [$1], [], [dnl +m4_errprintn(__file__:__line__:[Duplicate declaration of camlib $1])dnl m4_exit(1)dnl ])dnl -])dnl +dnl # END $0($@) +])dnl AC_DEFUN GP_CAMLIB dnl -dnl #################################################################### dnl +dnl #################################################################### +dnl GP_CAMLIBS_WARNING +dnl Print warning about building a non-"standard" set of camlibs. +dnl #################################################################### AC_DEFUN([GP_CAMLIBS_WARNING],[dnl AC_MSG_WARN([ -# Caution: You have chosen to build a non-standard set of camlibs. -# You may have disabled the camlib required for your camera, or -# enabled a camlib that does *not* work, and overrides the camlib -# that does work. Consequently, -# YOUR CAMERA MAY NOT WORK! -# -# Many cameras of several brands are supported by a camlib with a -# name different from the name of the camera brand or model. If you -# are unsure, please -# * enable at least the "ptp2" camlib -# * or even better, just build "all" camlibs. + #=====================================================================# + # Caution: You have chosen to build a non-standard set of camlibs. # + # You may have disabled the camlib required for your camera, # + # or enabled a camlib which does *not* work and overrides # + # the camlib which *does* work. Consequently, # + # YOUR CAMERA MAY NOT WORK! # + # # + # Many cameras of several brands are supported by a camlib with a # + # name different from the name of the camera brand or model. If you # + # are unsure, please # + # * enable at least the 'ptp2' camlib # + # * or even better, just build the standard set of camlibs. # + #=====================================================================# ]) -sleep 2 +sleep 5 ]) dnl +dnl dnl #################################################################### +dnl GP_CAMLIBS_CONDITIONAL_WARNING +dnl Call GP_CAMLIBS_WARNING when required. +dnl #################################################################### +AC_DEFUN([GP_CAMLIBS_CONDITIONAL_WARNING], [dnl +AS_VAR_IF([gp_sh_with_camlibs], [standard], [dnl +], [dnl +GP_CAMLIBS_WARNING +]) +])dnl dnl +dnl +dnl #################################################################### +dnl GP_CAMLIBS_DEFINE +dnl Determine the set of camlibs to build from the --with-camlibs +dnl parameter, and set the build variables accordingly. +dnl #################################################################### AC_DEFUN([GP_CAMLIBS_DEFINE],[dnl -AC_REQUIRE([GP_CAMLIBS_INIT])dnl -m4_pattern_allow([m4_strip])dnl -m4_ifval([$1],[m4_define([gp_camlib_srcdir],[$1])])dnl -dnl for camlib in m4_strip(gp_camlibs) m4_strip(gp_camlibs_unlisted) -dnl do -dnl if test -d "$srcdir/m4_strip(gp_camlib_srcdir)/$camlib"; then :; else -dnl AC_MSG_ERROR([ -dnl * Fatal: -dnl * Source subdirectory for camlib \`$camlib' not found in -dnl * directory \`$srcdir/m4_strip(gp_camlib_srcdir)/' -dnl ]) -dnl fi -dnl done -AC_MSG_CHECKING([which camlibs to compile]) +# BEGIN $0($@) +AC_REQUIRE([_GP_CAMLIBS_INIT])dnl +AC_REQUIRE([GP_PROG_EXPR])dnl + +dnl GP_SET_MSG([camlib-set-standard]) +dnl GP_SET_MSG([camlib-set-outdated]) +dnl GP_SET_MSG([camlib-set-unlisted]) + +dnl Convert sets defined at m4 time (i.e. autoreconf time) +dnl into the same format as the sh time (i.e. configure time) +dnl defined sets. +m4_foreach_w([var], [everything standard outdated unlisted], [dnl +GP_SET_DEFINE([m4-camlib-set-]var) +GP_SET_ADD_ALL([m4-camlib-set-]var[]m4_set_listc([gp_m4s_camlib_set_]var)) +])dnl + +dnl GP_SET_MSG([m4-camlib-set-standard]) +dnl GP_SET_MSG([m4-camlib-set-unlisted]) +dnl GP_SET_MSG([m4-camlib-set-outdated]) + +GP_SET_DEFINE([camlib-set-everything])dnl +GP_SET_UNION([camlib-set-everything], [camlib-set-standard], [camlib-set-outdated], [camlib-set-unlisted]) + +dnl GP_SET_MSG([camlib-set-everything]) +dnl GP_SET_MSG([m4-camlib-set-everything]) + dnl Yes, that help output won't be all that pretty, but we at least dnl do not have to edit it by hand. AC_ARG_WITH([camlibs],[AS_HELP_STRING( [--with-camlibs=<list>], [Compile camera drivers (camlibs) in <list>. ]dnl - [Drivers may be separated with commas. ]dnl + [Camlibs may be separated with commas. ]dnl [CAUTION: DRIVER NAMES AND CAMERA NAMES MAY DIFFER. ]dnl - ['all' is the default and compiles all camlibs, ]dnl - ['outdated' compiles additional camlibs for very old cameras. ]dnl - [Possible camlibs to specify are: ]dnl - m4_strip(gp_camlibs) - [Camlibs for very old (>10 years) cameras: ]dnl - m4_strip(gp_camlibs_outdated))]dnl -, - [camlibs="$withval"], - [camlibs="all"])dnl -dnl -ALL_DEFINED_CAMLIBS="m4_strip(gp_camlibs) m4_strip(gp_camlibs_outdated) m4_strip(gp_camlibs_unlisted)" -ALL_DEFAULT_CAMLIBS="m4_strip(gp_camlibs)" -BUILD_THESE_CAMLIBS_BASE="" -INSTALL_THESE_CAMLIBS_BASE="" -if test "$camlibs" = "all"; then - INSTALL_THESE_CAMLIBS_BASE="$ALL_DEFAULT_CAMLIBS" - AC_MSG_RESULT([all]) -else - # If the string starts with "all,", we start with the default list - # and add the explicitly defined ones later - if echo "$camlibs" | grep "^all," > /dev/null; then - INSTALL_THESE_CAMLIBS_BASE="$ALL_DEFAULT_CAMLIBS" - camlibs="$(echo "$camlibs" | sed 's/^all,//')" - fi - if echo "$camlibs" | grep "outdated" > /dev/null; then - INSTALL_THESE_CAMLIBS_BASE="$INSTALL_THESE_CAMLIBS_BASE m4_strip(gp_camlibs_outdated)" - camlibs="$(echo "$camlibs" | sed 's/outdated[,]*//')" - fi - - # camlibs=$(echo $camlibs | sed 's/,/ /g') - IFS_save="$IFS" - IFS=",$IFS" - # Walk through enumeration of camlibs given by user and add them to list - # of camlibs to build if we know them. - for camlib in ${camlibs}; do - IFS="$IFS_save" - found=false - for from_all_camlib in ${ALL_DEFINED_CAMLIBS}; do - if test "$camlib" = "$from_all_camlib"; then - if test "x$INSTALL_THESE_CAMLIBS_BASE" = "x"; then - INSTALL_THESE_CAMLIBS_BASE="$camlib" - else - INSTALL_THESE_CAMLIBS_BASE="$INSTALL_THESE_CAMLIBS_BASE $camlib" - fi - found=: - break - fi - done - if $found; then :; else - AC_MSG_ERROR([Unknown camlib $camlib!]) - fi - done - if test "x$INSTALL_THESE_CAMLIBS_BASE" = "xcanon" ; then - # Gentoo mode... if user just said "canon", add "ptp2" ... should save support requests. - INSTALL_THESE_CAMLIBS_BASE="$INSTALL_THESE_CAMLIBS_BASE ptp2" - camlibs="$camlibs ptp2" - AC_MSG_WARN([ - "You have just selected the old canon driver. However most current Canons\n" - "are supported by the PTP2 driver.\n" - "Autoselecting ptp2 driver too to avoid support requests.\n" - ]) - fi - IFS="$IFS_save" - AC_MSG_RESULT([$camlibs]) - GP_CAMLIBS_WARNING - AC_DEFINE_UNQUOTED([INCOMPLETE_CAMLIB_SET], ["$INSTALL_THESE_CAMLIBS_BASE"], - [Whether the set of camlibs built is incomplete]) -fi -BUILD_THESE_CAMLIBS="" -for f in $ALL_DEFINED_CAMLIBS + ['standard' is the default is a standard set of camlibs: ]dnl + m4_set_contents(gp_m4s_camlib_set_standard, [ ]). + ['outdated' is a set of camlibs for very old cameras: ]dnl + m4_set_contents(gp_m4s_camlib_set_outdated, [ ]).dnl + [You can add or remove camlibs or named camlib sets by adding ]dnl + [them to the list with a + or - sign in front.])], + [gp_sh_with_camlibs="${withval}"], + [gp_sh_with_camlibs="standard"])dnl + +dnl For backwards compatibility, accept --with-camlibs='all' and +dnl interpret it as --with-camlibs='standard'. +AS_VAR_IF([gp_sh_with_camlibs], [all], [dnl + gp_sh_with_camlibs="standard" +])dnl + +dnl Gentoo mode... if user just requested "canon", +dnl add "ptp2" to save support requests. +AS_VAR_IF([gp_sh_with_camlibs], [canon], [dnl + gp_sh_with_camlibs="${gp_sh_with_camlibs} ptp2" + AC_MSG_WARN([ + + #==============================================================# + # You have selected only the old 'canon' driver. However, most # + # current Canon camera models require the 'ptp2' driver. # + # # + # Autoselecting the 'ptp2' driver in addition to the 'canon' # + # driver to prevent unnecessary support requests. # + #==============================================================# + sleep 5 +])])dnl + +dnl set -x + +AC_MSG_CHECKING([with-camlibs requested]) +AS_VAR_IF([gp_sh_with_camlibs], [standard], [dnl + AC_MSG_RESULT([standard set]) +], [dnl + gp_sh_with_camlibs="$(echo "${gp_sh_with_camlibs}" | ${TR} ',' ' ')" + AC_MSG_RESULT([${gp_sh_with_camlibs}]) +]) + +dnl AC_MSG_CHECKING([for nothing]) +dnl AC_MSG_RESULT([nihil]) + +dnl Iterate over the list of given camlibs. +dnl +dnl Replace 'standard', 'outdated', 'unlisted', and 'everything' with +dnl the respective set of camlibs, and make sure any camlibs specified +dnl explicitly are actually valid defined camlibs. +GP_SET_DEFINE([m4-camlib-set]) +GP_SET_DEFINE([camlib-set]) +for gp_camlib in ${gp_sh_with_camlibs} do - BUILD_THESE_CAMLIBS="${BUILD_THESE_CAMLIBS}${BUILD_THESE_CAMLIBS+ }${f}.la" + operator="add" + case "X$gp_camlib" in #( + X-*) + operator=remove + gp_camlib="$(echo "Y${gp_camlib}" | ${SED} 's/^Y.//')" + ;; #( + X+*) + gp_camlib="$(echo "Y${gp_camlib}" | ${SED} 's/^Y.//')" + ;; + esac + dnl AC_MSG_CHECKING([with-camlibs operator]) + dnl AC_MSG_RESULT([${operator}]) + dnl AC_MSG_CHECKING([with-camlibs camlib]) + dnl AC_MSG_RESULT([${gp_camlib}]) + + dnl Convert deprecated "all" parameter to "standard". + case "$gp_camlib" in #( + all) + AC_MSG_WARN([ + + #==================================================================# + # You have called the configure script with the --with-camlibs=all # + # parameter. The name 'all' is a deprecated name for the # + # 'standard' camlib set. # + # # + # Please change your call to the configure script to use # + # --with-camlibs=standard instead. # + #==================================================================# +]) + sleep 5 + gp_camlib="standard" + ;; + esac + + dnl Now gp_camlib contains the camlib string, and operator 'add' or 'remove'. + case "$operator" in #( + add) + case "$gp_camlib" in #( + standard) + GP_SET_UNION([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-standard]) + GP_SET_UNION([camlib-set], [camlib-set], [camlib-set-standard]) + ;; #( + outdated) + GP_SET_UNION([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-outdated]) + GP_SET_UNION([camlib-set], [camlib-set], [camlib-set-outdated]) + ;; #( + unlisted) + GP_SET_UNION([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-unlisted]) + GP_SET_UNION([camlib-set], [camlib-set], [camlib-set-unlisted]) + ;; #( + everything) + GP_SET_UNION([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-everything]) + GP_SET_UNION([camlib-set], [camlib-set], [camlib-set-everything]) + ;; #( + *) + GP_SET_CONTAINS_IFELSE([m4-camlib-set-everything], ["${gp_camlib}"], [dnl + GP_SET_ADD([m4-camlib-set], ["$gp_camlib"]) + GP_SET_ADD([camlib-set], ["$gp_camlib"]) + ], [dnl + AC_MSG_ERROR([Unknown camlib found in --with-camlibs: '${gp_camlib}']) + ]) + ;; + esac + ;; #( + remove) + case "$gp_camlib" in #( + standard) + GP_SET_DIFFERENCE([camlib-set], [camlib-set], [camlib-set-standard]) + GP_SET_DIFFERENCE([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-standard]) + ;; #( + outdated) + GP_SET_DIFFERENCE([camlib-set], [camlib-set], [camlib-set-outdated]) + GP_SET_DIFFERENCE([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-outdated]) + ;; #( + unlisted) + GP_SET_DIFFERENCE([camlib-set], [camlib-set], [camlib-set-unlisted]) + GP_SET_DIFFERENCE([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-unlisted]) + ;; #( + everything) + GP_SET_DIFFERENCE([camlib-set], [camlib-set], [camlib-set-everything]) + GP_SET_DIFFERENCE([m4-camlib-set], [m4-camlib-set], [m4-camlib-set-everything]) + ;; #( + *) + GP_SET_CONTAINS_IFELSE([m4-camlib-set-everything], ["${gp_camlib}"], [dnl + GP_SET_REMOVE([camlib-set], ["$gp_camlib"]) + GP_SET_CONTAINS_IFELSE([m4-camlib-set], ["$gp_camlib"], [dnl + GP_SET_REMOVE([m4-camlib-set], ["$gp_camlib"]) + ], [dnl + AC_MSG_WARN([Removing camlib ${gp_camlib} from m4-camlib-set which does not contain ${gp_camlib}]) + ]) + ], [dnl + AC_MSG_ERROR([Unknown camlib found in --with-camlibs: '${gp_camlib}']) + ]) + ;; + esac + ;; + esac done +AS_UNSET([gp_camlib]) +AC_MSG_CHECKING([with-camlibs parsing]) +AC_MSG_RESULT([finished]) + +dnl GP_SET_MSG([m4-camlib-set]) +dnl GP_SET_MSG([camlib-set]) + +dnl Camlibs requested, but cannot be built. +GP_SET_DEFINE([camlib-set-diff-skipping]) +GP_SET_DIFFERENCE([camlib-set-diff-skipping], [m4-camlib-set], [camlib-set]) +GP_SET_MSG([camlib-set-diff-skipping]) -INSTALL_THESE_CAMLIBS="" -for f in $INSTALL_THESE_CAMLIBS_BASE +dnl Camlibs added over the standard set +GP_SET_DEFINE([camlib-set-diff-over-standard]) +GP_SET_DIFFERENCE([camlib-set-diff-over-standard], [camlib-set], [camlib-set-standard]) +GP_SET_MSG([camlib-set-diff-over-standard]) + +dnl Camlibs missing from the standard set +GP_SET_DEFINE([camlib-set-diff-from-standard]) +GP_SET_DIFFERENCE([camlib-set-diff-from-standard], [camlib-set-standard], [camlib-set]) +GP_SET_MSG([camlib-set-diff-from-standard]) + +GP_SET_DEBUG_MSG([camlib-set-diff-skipping]) +GP_SET_DEBUG_MSG([camlib-set-diff-from-standard]) +GP_SET_DEBUG_MSG([camlib-set-diff-over-standard]) + +GP_SET_SPACE_VAR([camlib-set-diff-skipping], [gp_camlib_set_skipping])dnl + +dnl We could use the cardinality of the difference sets to determine +dnl how far we are from the standard set. If we do not differ too +dnl much, we can still show the camlib set as "standard plus these +dnl minus those skipping that" instead of just listing the camlib +dnl names. + +dnl gp_camlibs_from_standard="$(GP_SET_CARDINALITY([camlib-set-diff-from-standard]))" +dnl AC_MSG_CHECKING([camlibs removed from standard set]) +dnl AC_MSG_RESULT([${gp_camlibs_from_standard}]) + +dnl gp_camlibs_over_standard="$(GP_SET_CARDINALITY([camlib-set-diff-over-standard]))" +dnl AC_MSG_CHECKING([camlibs added over standard set]) +dnl AC_MSG_RESULT([${gp_camlibs_over_standard}]) + +dnl gp_camlibs_non_standard="$(${EXPR} ${gp_camlibs_from_standard} + ${gp_camlibs_over_standard})" +dnl AC_MSG_CHECKING([total number of camlibs differing from standard set]) +dnl AC_MSG_RESULT([${gp_camlibs_non_standard}]) + +AC_MSG_CHECKING([whether skipping some requested camlibs]) +AS_IF([test "x$gp_camlib_set_skipping" = "x"], [dnl + AC_MSG_RESULT([no]) +], [dnl + AC_MSG_RESULT([yes (${gp_camlib_set_skipping})]) + AC_DEFINE_UNQUOTED([GP_CAMLIB_SET_SKIPPING], ["${gp_camlib_set_skipping}"], + [If defined, the camlibs which are skipped due to missing dependencies]) + AC_MSG_WARN([ + + #============================================================# + # We are skipping building a few requested camlibs, probably # + # due to missing dependencies. Check the dependencies if # + # you insist on building these camlibs. # + #============================================================# +]) + sleep 5 +]) + +GP_SET_SPACE_VAR([camlib-set], [gp_camlib_set]) +AC_MSG_CHECKING([camlib set to build in detail]) +AC_MSG_RESULT([${gp_camlib_set}]) + +GP_CAMLIBS_CONDITIONAL_WARNING + +dnl Whether user has requested a non-standard set of camlibs +GP_SET_EQUAL_IFELSE([camlib-set], [camlib-set-standard], [dnl + AS_IF([test "x$gp_camlib_set_skipping" = "x"], [dnl + GP_CONFIG_MSG([Camlibs],[standard set (${gp_camlib_set})]) + ], [dnl + GP_CONFIG_MSG([Camlibs],[standard set (${gp_camlib_set} SKIPPING ${gp_camlib_set_skipping})]) + ]) +], [dnl + AS_IF([test "x$gp_camlib_set_skipping" = "x"], [dnl + GP_CONFIG_MSG([Camlibs],[non-standard set (${gp_camlib_set})]) + ], [dnl + GP_CONFIG_MSG([Camlibs],[non-standard set (${gp_camlib_set} SKIPPING ${gp_camlib_set_skipping})]) + ]) + m4_pattern_allow([GP_CAMLIB_SET_IS_NONSTANDARD])dnl + AC_DEFINE_UNQUOTED([GP_CAMLIB_SET_IS_NONSTANDARD], [1], + [define when the camlib set to buidl is non-standard]) +])dnl + +m4_pattern_allow([GP_CAMLIB_SET])dnl +AC_DEFINE_UNQUOTED([GP_CAMLIB_SET], ["${gp_camlib_set}"], + [The actually defined set of camlibs to build]) + +AS_UNSET([GP_CAMLIB_SET]) +for f in ${gp_camlib_set} do - INSTALL_THESE_CAMLIBS="${INSTALL_THESE_CAMLIBS}${INSTALL_THESE_CAMLIBS+ }${f}.la" + GP_CAMLIB_SET="${GP_CAMLIB_SET}${GP_CAMLIB_SET+ }${f}.la" done -AC_SUBST([BUILD_THESE_CAMLIBS]) -AC_SUBST([INSTALL_THESE_CAMLIBS]) -AC_SUBST([ALL_DEFINED_CAMLIBS]) -AC_SUBST([ALL_DEFAULT_CAMLIBS]) +AS_UNSET([f]) +AC_SUBST([GP_CAMLIB_SET]) + +m4_pattern_allow([GP_CAMLIB_SET_EVERYTHING])dnl +AC_SUBST([GP_CAMLIB_SET_EVERYTHING], + ["m4_set_contents([gp_m4s_camlib_set_everything], [ ])"]) + +# END $0($@) ])dnl dnl +dnl dnl #################################################################### dnl dnl Local Variables: |