X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=914ae5759f6932c28ee39afec1e36d80c8e63cd9;hb=6d0d465e20b8c11924bc4e75563324771d0e0d63;hp=78345ebb60240e6642f319467defe3e07d4aa263;hpb=0346e324c2acdd763224cc071d6a6d0f55a982a1;p=git.git diff --git a/configure.ac b/configure.ac index 78345ebb6..914ae5759 100644 --- a/configure.ac +++ b/configure.ac @@ -23,21 +23,32 @@ AC_DEFUN([GIT_CONF_APPEND_LINE], # GIT_ARG_SET_PATH(PROGRAM) # ------------------------- # Provide --with-PROGRAM=PATH option to set PATH to PROGRAM +# Optional second argument allows setting NO_PROGRAM=YesPlease if +# --without-PROGRAM version used. AC_DEFUN([GIT_ARG_SET_PATH], [AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1=PATH], [provide PATH to $1])], - [GIT_CONF_APPEND_PATH($1)],[]) + [GIT_CONF_APPEND_PATH($1,$2)],[]) ])# GIT_ARG_SET_PATH # # GIT_CONF_APPEND_PATH(PROGRAM) # ------------------------------ # Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH # Used by GIT_ARG_SET_PATH(PROGRAM) +# Optional second argument allows setting NO_PROGRAM=YesPlease if +# --without-PROGRAM is used. AC_DEFUN([GIT_CONF_APPEND_PATH], [PROGRAM=m4_toupper($1); \ if test "$withval" = "no"; then \ - AC_MSG_ERROR([You cannot use git without $1]); \ + if test -n "$2"; then \ + m4_toupper($1)_PATH=$withval; \ + AC_MSG_NOTICE([Disabling use of ${PROGRAM}]); \ + GIT_CONF_APPEND_LINE(NO_${PROGRAM}=YesPlease); \ + GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=); \ + else \ + AC_MSG_ERROR([You cannot use git without $1]); \ + fi; \ else \ if test "$withval" = "yes"; then \ AC_MSG_WARN([You should provide path for --with-$1=PATH]); \ @@ -277,7 +288,7 @@ GIT_ARG_SET_PATH(shell) GIT_ARG_SET_PATH(perl) # # Define PYTHON_PATH to provide path to Python. -GIT_ARG_SET_PATH(python) +GIT_ARG_SET_PATH(python, allow-without) # # Define ZLIB_PATH to provide path to zlib. GIT_ARG_SET_PATH(zlib) @@ -762,10 +773,9 @@ AC_SUBST(NO_MKSTEMPS) # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. # Enable it on Windows. By default, symrefs are still used. # -# Define NO_PTHREADS if we do not have pthreads +# Define NO_PTHREADS if we do not have pthreads. # -# Define PTHREAD_LIBS to the linker flag used for Pthread support and define -# THREADED_DELTA_SEARCH if Pthreads are available. +# Define PTHREAD_LIBS to the linker flag used for Pthread support. AC_DEFUN([PTHREADTEST_SRC], [ #include @@ -782,7 +792,6 @@ dnl [[pthread_mutex_t test_mutex;]] dnl )]) NO_PTHREADS=UnfortunatelyYes -THREADED_DELTA_SEARCH= PTHREAD_LIBS= if test -n "$USER_NOPTHREAD"; then @@ -798,7 +807,6 @@ elif test -z "$PTHREAD_CFLAGS"; then [AC_MSG_RESULT([yes]) NO_PTHREADS= PTHREAD_LIBS="$opt" - THREADED_DELTA_SEARCH=YesPlease break ], [AC_MSG_RESULT([no])]) @@ -812,7 +820,6 @@ else [AC_MSG_RESULT([yes]) NO_PTHREADS= PTHREAD_LIBS="$PTHREAD_CFLAGS" - THREADED_DELTA_SEARCH=YesPlease ], [AC_MSG_RESULT([no])]) @@ -823,7 +830,6 @@ CFLAGS="$old_CFLAGS" AC_SUBST(PTHREAD_LIBS) AC_SUBST(NO_PTHREADS) -AC_SUBST(THREADED_DELTA_SEARCH) ## Output files AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])