message "if configure fails, unknown camera driver, please reconfigure"  &&
message "most modern cameras use PTP2 protocol" &&
persistent_add DRIVER  &&
if  query  "Do you want to (re)configure drivers?" n
  then
    local drivers=$(  sed  's/$/\0 driver off/'  $SCRIPT_DIRECTORY/drivers  )

    persistent_add DRIVER
    DRIVER=$(  dialog  --backtitle  "libGPhoto2 driver selection"   \
                  --stdout                                          \
                  --title  "Select driver please"                   \
                  --checklist                                       \
                  ""                                                \
                  0  0  10                                          \
                  all driver on  $drivers  )

    DRIVER=${DRIVER//\"/}     # Remove all " characters.
    DRIVER=${DRIVER// /,}     # Replace spaces with commas.
    DRIVER=${DRIVER%,}        # Strip any stray comma at the end.
    DRIVER=`echo $DRIVER | tr -d '\t'` # Remove strange leading tab

fi  &&
if  [  -z  "$DRIVER"  ]  ;  then
  DRIVER='"all"'
fi  &&

config_query_string GP_RUN 'which program to run when camera is detected?' '/bin/true' &&

config_query  DOXYGEN  "Do you want to build C++ API documentation?" n
