@matheusbsbs / matheus-bagliano / commits / a20b4d899a
Fork 0

autoconf: Add support for setting CURLDIR, OPENSSLDIR, EXPATDIR

Add support for --with-openssl=PATH and --without-openssl, --with-curl=PATH and --without-curl, --with-expat=PATH and --without-expat ./configure options, each setting or unsetting appropriate NO_PACKAGE and if called with argument also PACKAGEDIR (of which only CURLDIR is documented in Makefile) All above options are supported as override to autodetection; more to come in the same style (override to autodetection), so moved the bulk of comments for site configuration down. Needs review by someone well versed in autoconf and m4. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Aug 9, 2006 at 02:15 UTC a20b4d899ae75e075641d7bfe9462a239c8b9236
1 file changed +101 -57
configure.ac
+101 -57
@@ -46,53 +46,29 @@ else \
46 fi; \
47 fi; \
48 ]) # GIT_CONF_APPEND_PATH
49 +#
50 +# GIT_PARSE_WITH(PACKAGE)
51 +# -----------------------
52 +# For use in AC_ARG_WITH action-if-found, for packages default ON.
53 +# * Set NO_PACKAGE=YesPlease for --without-PACKAGE
54 +# * Set PACKAGEDIR=PATH for --with-PACKAGE=PATH
55 +# * Unset NO_PACKAGE for --with-PACKAGE without ARG
56 +AC_DEFUN([GIT_PARSE_WITH],
57 +[PACKAGE=m4_toupper($1); \
58 +if test "$withval" = "no"; then \
59 + m4_toupper(NO_$1)=YesPlease; \
60 +elif test "$withval" = "yes"; then \
61 + m4_toupper(NO_$1)=; \
62 +else \
63 + m4_toupper(NO_$1)=; \
64 + GIT_CONF_APPEND_LINE(${PACKAGE}DIR=$withval); \
65 +fi \
66 +])# GIT_PARSE_WITH
67
68
51 -## Site configuration
69 +## Site configuration related to programs (before tests)
70 ## --with-PACKAGE[=ARG] and --without-PACKAGE
71 #
54 -# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
55 -# tests. These tests take up a significant amount of the total test time
56 -# but are not needed unless you plan to talk to SVN repos.
57 -#
58 -# Define MOZILLA_SHA1 environment variable when running make to make use of
59 -# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
60 -# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
61 -# choice) has very fast version optimized for i586.
62 -#
63 -# Define PPC_SHA1 environment variable when running make to make use of
64 -# a bundled SHA1 routine optimized for PowerPC.
65 -#
66 -# Define ARM_SHA1 environment variable when running make to make use of
67 -# a bundled SHA1 routine optimized for ARM.
68 -#
69 -# Define NO_OPENSSL environment variable if you do not have OpenSSL.
70 -# This also implies MOZILLA_SHA1.
71 -#
72 -# Define NO_CURL if you do not have curl installed. git-http-pull and
73 -# git-http-push are not built, and you cannot use http:// and https://
74 -# transports.
75 -#
76 -# Define CURLDIR=/foo/bar if your curl header and library files are in
77 -# /foo/bar/include and /foo/bar/lib directories.
78 -#
79 -# Define NO_EXPAT if you do not have expat installed. git-http-push is
80 -# not built, and you cannot push using http:// and https:// transports.
81 -#
82 -# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
83 -# installed in /sw, but don't want GIT to link against any libraries
84 -# installed there. If defined you may specify your own (or Fink's)
85 -# include directories and library directories by defining CFLAGS
86 -# and LDFLAGS appropriately.
87 -#
88 -# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
89 -# have DarwinPorts installed in /opt/local, but don't want GIT to
90 -# link against any libraries installed there. If defined you may
91 -# specify your own (or DarwinPort's) include directories and
92 -# library directories by defining CFLAGS and LDFLAGS appropriately.
93 -#
94 -# Define NO_MMAP if you want to avoid mmap.
95 -#
72 # Define SHELL_PATH to provide path to shell.
73 GIT_ARG_SET_PATH(shell)
74 #
@@ -114,20 +90,6 @@ AS_HELP_STRING([--without-python], [don't use python scripts])],
90 ])
91 AC_SUBST(NO_PYTHON)
92 AC_SUBST(PYTHON_PATH)
117 -#
118 -## --enable-FEATURE[=ARG] and --disable-FEATURE
119 -# Define COLLISION_CHECK below if you believe that SHA1's
120 -# 1461501637330902918203684832716283019655932542976 hashes do not give you
121 -# sufficient guarantee that no collisions between objects will ever happen.
122 -#
123 -# Define USE_NSEC below if you want git to care about sub-second file mtimes
124 -# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
125 -# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
126 -# randomly break unless your underlying filesystem supports those sub-second
127 -# times (my ext3 doesn't).
128 -#
129 -# Define USE_STDEV below if you want git to care about the underlying device
130 -# change being considered an inode change from the update-cache perspective.
93
94
95 ## Checks for programs.
@@ -259,6 +221,7 @@ else
221 fi
222 AC_SUBST(NO_C99_FORMAT)
223
224 +
225 ## Checks for library functions.
226 ## (in default C library and libraries checked by AC_CHECK_LIB)
227 AC_MSG_NOTICE([CHECKS for library functions])
@@ -299,6 +262,87 @@ AC_SUBST(NO_SETENV)
262 # a missing newline at the end of the file.
263
264
265 +## Site configuration (override autodetection)
266 +## --with-PACKAGE[=ARG] and --without-PACKAGE
267 +AC_MSG_NOTICE([CHECKS for site configuration])
268 +#
269 +# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
270 +# tests. These tests take up a significant amount of the total test time
271 +# but are not needed unless you plan to talk to SVN repos.
272 +#
273 +# Define MOZILLA_SHA1 environment variable when running make to make use of
274 +# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
275 +# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
276 +# choice) has very fast version optimized for i586.
277 +#
278 +# Define PPC_SHA1 environment variable when running make to make use of
279 +# a bundled SHA1 routine optimized for PowerPC.
280 +#
281 +# Define ARM_SHA1 environment variable when running make to make use of
282 +# a bundled SHA1 routine optimized for ARM.
283 +#
284 +# Define NO_OPENSSL environment variable if you do not have OpenSSL.
285 +# This also implies MOZILLA_SHA1.
286 +#
287 +# Define OPENSSLDIR=/foo/bar if your openssl header and library files are in
288 +# /foo/bar/include and /foo/bar/lib directories.
289 +AC_ARG_WITH(openssl,
290 +AS_HELP_STRING([--with-openssl],[use OpenSSL library (default is YES)])
291 +AS_HELP_STRING([], [ARG can be prefix for openssl library and headers]),\
292 +GIT_PARSE_WITH(openssl))
293 +#
294 +# Define NO_CURL if you do not have curl installed. git-http-pull and
295 +# git-http-push are not built, and you cannot use http:// and https://
296 +# transports.
297 +#
298 +# Define CURLDIR=/foo/bar if your curl header and library files are in
299 +# /foo/bar/include and /foo/bar/lib directories.
300 +AC_ARG_WITH(curl,
301 +AS_HELP_STRING([--with-curl],[support http(s):// transports (default is YES)])
302 +AS_HELP_STRING([], [ARG can be also prefix for curl library and headers]),
303 +GIT_PARSE_WITH(curl))
304 +#
305 +# Define NO_EXPAT if you do not have expat installed. git-http-push is
306 +# not built, and you cannot push using http:// and https:// transports.
307 +#
308 +# Define EXPATDIR=/foo/bar if your expat header and library files are in
309 +# /foo/bar/include and /foo/bar/lib directories.
310 +AC_ARG_WITH(expat,
311 +AS_HELP_STRING([--with-expat],
312 +[support git-push using http:// and https:// transports via WebDAV (default is YES)])
313 +AS_HELP_STRING([], [ARG can be also prefix for expat library and headers]),
314 +GIT_PARSE_WITH(expat))
315 +#
316 +# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
317 +# installed in /sw, but don't want GIT to link against any libraries
318 +# installed there. If defined you may specify your own (or Fink's)
319 +# include directories and library directories by defining CFLAGS
320 +# and LDFLAGS appropriately.
321 +#
322 +# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
323 +# have DarwinPorts installed in /opt/local, but don't want GIT to
324 +# link against any libraries installed there. If defined you may
325 +# specify your own (or DarwinPort's) include directories and
326 +# library directories by defining CFLAGS and LDFLAGS appropriately.
327 +#
328 +# Define NO_MMAP if you want to avoid mmap.
329 +
330 +## --enable-FEATURE[=ARG] and --disable-FEATURE
331 +#
332 +# Define COLLISION_CHECK below if you believe that SHA1's
333 +# 1461501637330902918203684832716283019655932542976 hashes do not give you
334 +# sufficient guarantee that no collisions between objects will ever happen.
335 +#
336 +# Define USE_NSEC below if you want git to care about sub-second file mtimes
337 +# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
338 +# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
339 +# randomly break unless your underlying filesystem supports those sub-second
340 +# times (my ext3 doesn't).
341 +#
342 +# Define USE_STDEV below if you want git to care about the underlying device
343 +# change being considered an inode change from the update-cache perspective.
344 +
345 +
346 ## Output files
347 AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
348 AC_OUTPUT