Changeset 12084


Ignore:
Timestamp:
Apr 29, 2005, 2:51:27 AM (15 years ago)
Author:
jberry
Message:

Bug: 2975
Submitted by: dluke, jberry@
Reviewed by: jberry

Remember path to tar cmd for use at run time. The prevents a different tar being used at run time than was found by configure.

Location:
trunk/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r11922 r12084  
    418418dnl This macro tests for tar support of --no-same-owner
    419419AC_DEFUN([OD_TAR_NO_SAME_OWNER],[
    420         AC_CHECK_PROG(TAR_CMD, [gnutar], [gnutar], [tar])
    421         AC_MSG_CHECKING([for tar --no-same-owner support])
     420        AC_PATH_PROG(TAR, [tar])
     421        AC_PATH_PROG(GNUTAR, [gnutar])
     422       
     423        AC_MSG_CHECKING([for which tar variant to use])
     424        AS_IF([test -n "$GNUTAR"], [TAR_CMD=$GNUTAR], [TAR_CMD=$TAR])
     425        AC_MSG_RESULT([$TAR_CMD])
     426        AC_SUBST(TAR_CMD)
     427
     428        AC_MSG_CHECKING([for $TAR_CMD --no-same-owner support])
    422429        [no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`]
    423430        if test -z "$no_same_owner_support" ; then
  • trunk/base/configure

    r11997 r12084  
    314314#endif"
    315315
    316 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS HAVE_LAUNCHD LAUNCHCTL TAR_CMD CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
     316ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS HAVE_LAUNCHD LAUNCHCTL TAR GNUTAR TAR_CMD CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
    317317ac_subst_files=''
    318318
     
    26712671
    26722672
    2673 
    2674         # Extract the first word of "gnutar", so it can be a program name with args.
    2675 set dummy gnutar; ac_word=$2
     2673        # Extract the first word of "tar", so it can be a program name with args.
     2674set dummy tar; ac_word=$2
    26762675echo "$as_me:$LINENO: checking for $ac_word" >&5
    26772676echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    2678 if test "${ac_cv_prog_TAR_CMD+set}" = set; then
     2677if test "${ac_cv_path_TAR+set}" = set; then
    26792678  echo $ECHO_N "(cached) $ECHO_C" >&6
    26802679else
    2681   if test -n "$TAR_CMD"; then
    2682   ac_cv_prog_TAR_CMD="$TAR_CMD" # Let the user override the test.
    2683 else
    2684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2680  case $TAR in
     2681  [\\/]* | ?:[\\/]*)
     2682  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
     2683  ;;
     2684  *)
     2685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    26852686for as_dir in $PATH
    26862687do
     
    26892690  for ac_exec_ext in '' $ac_executable_extensions; do
    26902691  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    2691     ac_cv_prog_TAR_CMD="gnutar"
     2692    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
    26922693    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    26932694    break 2
     
    26962697done
    26972698
    2698   test -z "$ac_cv_prog_TAR_CMD" && ac_cv_prog_TAR_CMD="tar"
    2699 fi
    2700 fi
    2701 TAR_CMD=$ac_cv_prog_TAR_CMD
    2702 if test -n "$TAR_CMD"; then
    2703   echo "$as_me:$LINENO: result: $TAR_CMD" >&5
    2704 echo "${ECHO_T}$TAR_CMD" >&6
     2699  ;;
     2700esac
     2701fi
     2702TAR=$ac_cv_path_TAR
     2703
     2704if test -n "$TAR"; then
     2705  echo "$as_me:$LINENO: result: $TAR" >&5
     2706echo "${ECHO_T}$TAR" >&6
    27052707else
    27062708  echo "$as_me:$LINENO: result: no" >&5
     
    27082710fi
    27092711
    2710         echo "$as_me:$LINENO: checking for tar --no-same-owner support" >&5
    2711 echo $ECHO_N "checking for tar --no-same-owner support... $ECHO_C" >&6
     2712        # Extract the first word of "gnutar", so it can be a program name with args.
     2713set dummy gnutar; ac_word=$2
     2714echo "$as_me:$LINENO: checking for $ac_word" >&5
     2715echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     2716if test "${ac_cv_path_GNUTAR+set}" = set; then
     2717  echo $ECHO_N "(cached) $ECHO_C" >&6
     2718else
     2719  case $GNUTAR in
     2720  [\\/]* | ?:[\\/]*)
     2721  ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a path.
     2722  ;;
     2723  *)
     2724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2725for as_dir in $PATH
     2726do
     2727  IFS=$as_save_IFS
     2728  test -z "$as_dir" && as_dir=.
     2729  for ac_exec_ext in '' $ac_executable_extensions; do
     2730  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2731    ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext"
     2732    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2733    break 2
     2734  fi
     2735done
     2736done
     2737
     2738  ;;
     2739esac
     2740fi
     2741GNUTAR=$ac_cv_path_GNUTAR
     2742
     2743if test -n "$GNUTAR"; then
     2744  echo "$as_me:$LINENO: result: $GNUTAR" >&5
     2745echo "${ECHO_T}$GNUTAR" >&6
     2746else
     2747  echo "$as_me:$LINENO: result: no" >&5
     2748echo "${ECHO_T}no" >&6
     2749fi
     2750
     2751
     2752        echo "$as_me:$LINENO: checking for which tar variant to use" >&5
     2753echo $ECHO_N "checking for which tar variant to use... $ECHO_C" >&6
     2754        if test -n "$GNUTAR"; then
     2755  TAR_CMD=$GNUTAR
     2756else
     2757  TAR_CMD=$TAR
     2758fi
     2759
     2760        echo "$as_me:$LINENO: result: $TAR_CMD" >&5
     2761echo "${ECHO_T}$TAR_CMD" >&6
     2762
     2763
     2764        echo "$as_me:$LINENO: checking for $TAR_CMD --no-same-owner support" >&5
     2765echo $ECHO_N "checking for $TAR_CMD --no-same-owner support... $ECHO_C" >&6
    27122766        no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`
    27132767        if test -z "$no_same_owner_support" ; then
     
    82728326s,@HAVE_LAUNCHD@,$HAVE_LAUNCHD,;t t
    82738327s,@LAUNCHCTL@,$LAUNCHCTL,;t t
     8328s,@TAR@,$TAR,;t t
     8329s,@GNUTAR@,$GNUTAR,;t t
    82748330s,@TAR_CMD@,$TAR_CMD,;t t
    82758331s,@CFLAGS_QUICHEEATERS@,$CFLAGS_QUICHEEATERS,;t t
  • trunk/base/configure.ac

    r11997 r12084  
    1919AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
    2020
    21 AC_SUBST(TAR_CMD)
    2221OD_TAR_NO_SAME_OWNER
    2322
Note: See TracChangeset for help on using the changeset viewer.