]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Update Docker Plugin build procedure.
authorRadosław Korzeniewski <radekk@inteos.pl>
Tue, 22 Oct 2019 10:58:11 +0000 (12:58 +0200)
committerRadosław Korzeniewski <radekk@inteos.pl>
Sat, 14 Dec 2019 14:57:11 +0000 (15:57 +0100)
bacula/autoconf/configure.in
bacula/configure

index 1ea09cf3ea3d28dec3afacd0c57c4813504edf40..020ffffe8e72fcae21825c5034ddefe1c410ba19 100644 (file)
@@ -3021,11 +3021,13 @@ AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
    ]
 )
 
-PLUGCONFILES=""
-
 dnl
-dnl Docker Plugin enable/disable
+dnl Enable/Disable plugin support
 dnl
+
+PLUGCONFILES=""
+
+dnl Docker Plugin
 support_docker=auto
 AC_ARG_ENABLE(docker-plugin,
    AC_HELP_STRING([--disable-docker-plugin], [disable Docker plugin support @<:@default=auto@:>@]),
@@ -3038,8 +3040,9 @@ AC_ARG_ENABLE(docker-plugin,
    ]
 )
 if test x$support_docker = xyes -o x$support_docker = xauto; then
-   AC_PATH_PROG(docker_bin_path, "docker", "no")
-   if test x$docker_bin_path != xno; then
+   AC_CHECK_PROG(docker_bin, docker, yes, no, "/usr/bin/")
+   if test x$docker_bin = xyes; then
+      support_docker=yes
       FD_PLUGIN_DIR="$FD_PLUGIN_DIR src/plugins/fd/docker"
       PLUGCONFILES="${PLUGCONFILES} src/plugins/fd/docker/Makefile"
    else
index e3028c0213027d0fde75dfb03f94207a37120649..9edd171d92284d84749cece123f4bd75d51893b1 100755 (executable)
@@ -649,7 +649,7 @@ DEBUG
 FDLIBS
 CAP_LIBS
 FD_PLUGIN_DIR
-docker_bin_path
+docker_bin
 XATTROBJS
 ACLOBJS
 LZO_LIBS
@@ -30853,6 +30853,7 @@ fi
 fi
 
 
+
 PLUGCONFILES=""
 
 support_docker=auto
@@ -30869,26 +30870,24 @@ if test "${enable_docker_plugin+set}" = set; then :
 fi
 
 if test x$support_docker = xyes -o x$support_docker = xauto; then
-   # Extract the first word of ""docker"", so it can be a program name with args.
-set dummy "docker"; ac_word=$2
+   # Extract the first word of "docker", so it can be a program name with args.
+set dummy docker; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_docker_bin_path+:} false; then :
+if ${ac_cv_prog_docker_bin+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $docker_bin_path in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_docker_bin_path="$docker_bin_path" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  if test -n "$docker_bin"; then
+  ac_cv_prog_docker_bin="$docker_bin" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "/usr/bin/"
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_docker_bin_path="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_prog_docker_bin="yes"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -30896,21 +30895,21 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_docker_bin_path" && ac_cv_path_docker_bin_path=""no""
-  ;;
-esac
+  test -z "$ac_cv_prog_docker_bin" && ac_cv_prog_docker_bin="no"
+fi
 fi
-docker_bin_path=$ac_cv_path_docker_bin_path
-if test -n "$docker_bin_path"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docker_bin_path" >&5
-$as_echo "$docker_bin_path" >&6; }
+docker_bin=$ac_cv_prog_docker_bin
+if test -n "$docker_bin"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $docker_bin" >&5
+$as_echo "$docker_bin" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-   if test x$docker_bin_path != xno; then
+   if test x$docker_bin = xyes; then
+      support_docker=yes
       FD_PLUGIN_DIR="$FD_PLUGIN_DIR src/plugins/fd/docker"
       PLUGCONFILES="${PLUGCONFILES} src/plugins/fd/docker/Makefile"
    else