build: don't duplicate substitution of make variables
Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR' can be defined to a value 'VAL' at ./configure runtime in our build system simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the 'VAR = @VAR@' definition in config.mak.in. Less duplication, less margin for error, less possibility of confusion. While at it, fix some formatting issues in configure.ac that unnecessarily obscured the code flow. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini committed
Sep 11, 2012 at 17:45 UTC
40bfbde9da5c6cbc85f49a755f27162dc966fd89
2 files changed
+76
-117
config.mak.in
-49
@@ -5,12 +5,10 @@ CC = @CC@
5
CFLAGS = @CFLAGS@
6
CPPFLAGS = @CPPFLAGS@
7
LDFLAGS = @LDFLAGS@
8
-CC_LD_DYNPATH = @CC_LD_DYNPATH@
8
AR = @AR@
9
TAR = @TAR@
10
DIFF = @DIFF@
11
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
13
-TCLTK_PATH = @TCLTK_PATH@
12
13
prefix = @prefix@
14
exec_prefix = @exec_prefix@
@@ -27,50 +25,3 @@ VPATH = @srcdir@
25
26
export exec_prefix mandir
27
export srcdir VPATH
30
-
31
-NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
32
-NO_OPENSSL=@NO_OPENSSL@
33
-NO_CURL=@NO_CURL@
34
-NO_EXPAT=@NO_EXPAT@
35
-NO_LIBGEN_H=@NO_LIBGEN_H@
36
-HAVE_PATHS_H=@HAVE_PATHS_H@
37
-HAVE_LIBCHARSET_H=@HAVE_LIBCHARSET_H@
38
-NO_GETTEXT=@NO_GETTEXT@
39
-LIBC_CONTAINS_LIBINTL=@LIBC_CONTAINS_LIBINTL@
40
-NEEDS_LIBICONV=@NEEDS_LIBICONV@
41
-NEEDS_SOCKET=@NEEDS_SOCKET@
42
-NEEDS_RESOLV=@NEEDS_RESOLV@
43
-NEEDS_LIBGEN=@NEEDS_LIBGEN@
44
-NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
45
-NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
46
-NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
47
-NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@
48
-NO_IPV6=@NO_IPV6@
49
-NO_HSTRERROR=@NO_HSTRERROR@
50
-NO_STRCASESTR=@NO_STRCASESTR@
51
-NO_STRTOK_R=@NO_STRTOK_R@
52
-NO_FNMATCH=@NO_FNMATCH@
53
-NO_FNMATCH_CASEFOLD=@NO_FNMATCH_CASEFOLD@
54
-NO_MEMMEM=@NO_MEMMEM@
55
-NO_STRLCPY=@NO_STRLCPY@
56
-NO_UINTMAX_T=@NO_UINTMAX_T@
57
-NO_STRTOUMAX=@NO_STRTOUMAX@
58
-NO_SETENV=@NO_SETENV@
59
-NO_UNSETENV=@NO_UNSETENV@
60
-NO_MKDTEMP=@NO_MKDTEMP@
61
-NO_MKSTEMPS=@NO_MKSTEMPS@
62
-NO_INET_NTOP=@NO_INET_NTOP@
63
-NO_INET_PTON=@NO_INET_PTON@
64
-NO_ICONV=@NO_ICONV@
65
-OLD_ICONV=@OLD_ICONV@
66
-NO_REGEX=@NO_REGEX@
67
-USE_LIBPCRE=@USE_LIBPCRE@
68
-NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
69
-INLINE=@INLINE@
70
-SOCKLEN_T=@SOCKLEN_T@
71
-FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@
72
-SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
73
-NO_PTHREADS=@NO_PTHREADS@
74
-PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
75
-PTHREAD_LIBS=@PTHREAD_LIBS@
76
-CHARSET_LIB=@CHARSET_LIB@
configure.ac
+76
-68
@@ -267,6 +267,8 @@ AS_HELP_STRING([], [ARG can be also prefix for libpcre library and hea
267
USE_LIBPCRE=YesPlease
268
LIBPCREDIR=$withval
269
AC_MSG_NOTICE([Setting LIBPCREDIR to $LIBPCREDIR])
270
+ dnl USE_LIBPCRE can still be modified below, so don't substitute
271
+ dnl it yet.
272
GIT_CONF_SUBST([LIBPCREDIR])
273
fi)
274
#
@@ -387,9 +389,10 @@ AC_MSG_NOTICE([CHECKS for programs])
389
AC_PROG_CC([cc gcc])
390
AC_C_INLINE
391
case $ac_cv_c_inline in
390
- inline | yes | no) ;;
391
- *) AC_SUBST([INLINE], [$ac_cv_c_inline]) ;;
392
+ inline | yes | no) INLINE='';;
393
+ *) INLINE=$ac_cv_c_inline ;;
394
esac
395
+GIT_CONF_SUBST([INLINE])
396
397
# which switch to pass runtime path to dynamic libraries to the linker
398
AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [
@@ -399,7 +402,7 @@ AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [
402
LDFLAGS="${SAVE_LDFLAGS}"
403
])
404
if test "$git_cv_ld_dashr" = "yes"; then
402
- AC_SUBST(CC_LD_DYNPATH, [-R])
405
+ CC_LD_DYNPATH=-R
406
else
407
AC_CACHE_CHECK([if linker supports -Wl,-rpath,], git_cv_ld_wl_rpath, [
408
SAVE_LDFLAGS="${LDFLAGS}"
@@ -408,7 +411,7 @@ else
411
LDFLAGS="${SAVE_LDFLAGS}"
412
])
413
if test "$git_cv_ld_wl_rpath" = "yes"; then
411
- AC_SUBST(CC_LD_DYNPATH, [-Wl,-rpath,])
414
+ CC_LD_DYNPATH=-Wl,-rpath
415
else
416
AC_CACHE_CHECK([if linker supports -rpath], git_cv_ld_rpath, [
417
SAVE_LDFLAGS="${LDFLAGS}"
@@ -417,32 +420,35 @@ else
420
LDFLAGS="${SAVE_LDFLAGS}"
421
])
422
if test "$git_cv_ld_rpath" = "yes"; then
420
- AC_SUBST(CC_LD_DYNPATH, [-rpath])
423
+ CC_LD_DYNPATH=-rpath
424
else
425
+ CC_LD_DYNPATH=
426
AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
427
fi
428
fi
429
fi
430
+GIT_CONF_SUBST([CC_LD_DYNPATH])
431
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
432
AC_CHECK_TOOLS(AR, [gar ar], :)
433
AC_CHECK_PROGS(TAR, [gtar tar])
434
AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])
435
# TCLTK_PATH will be set to some value if we want Tcl/Tk
436
# or will be empty otherwise.
432
-if test -z "$NO_TCLTK"; then
437
+if test -n "$NO_TCLTK"; then
438
+ TCLTK_PATH=
439
+else
440
if test "$with_tcltk" = ""; then
441
# No Tcl/Tk switches given. Do not check for Tcl/Tk, use bare 'wish'.
442
TCLTK_PATH=wish
436
- AC_SUBST(TCLTK_PATH)
443
elif test "$with_tcltk" = "yes"; then
444
# Tcl/Tk check requested.
445
AC_CHECK_PROGS(TCLTK_PATH, [wish], )
446
else
447
AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])
448
TCLTK_PATH="$with_tcltk"
443
- AC_SUBST(TCLTK_PATH)
449
fi
450
fi
451
+GIT_CONF_SUBST([TCLTK_PATH])
452
AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
453
if test -n "$ASCIIDOC"; then
454
AC_MSG_CHECKING([for asciidoc version])
@@ -469,13 +475,13 @@ GIT_STASH_FLAGS($OPENSSLDIR)
475
AC_CHECK_LIB([crypto], [SHA1_Init],
476
[NEEDS_SSL_WITH_CRYPTO=],
477
[AC_CHECK_LIB([ssl], [SHA1_Init],
472
- [NEEDS_SSL_WITH_CRYPTO=YesPlease],
473
- [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])
478
+ [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],
479
+ [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])
480
481
GIT_UNSTASH_FLAGS($OPENSSLDIR)
482
477
-AC_SUBST(NEEDS_SSL_WITH_CRYPTO)
478
-AC_SUBST(NO_OPENSSL)
483
+GIT_CONF_SUBST([NEEDS_SSL_WITH_CRYPTO])
484
+GIT_CONF_SUBST([NO_OPENSSL])
485
486
#
487
# Define USE_LIBPCRE if you have and want to use libpcre. git-grep will be
@@ -492,7 +498,7 @@ AC_CHECK_LIB([pcre], [pcre_version],
498
499
GIT_UNSTASH_FLAGS($LIBPCREDIR)
500
495
-AC_SUBST(USE_LIBPCRE)
501
+GIT_CONF_SUBST([USE_LIBPCRE])
502
503
fi
504
@@ -509,7 +515,7 @@ AC_CHECK_LIB([curl], [curl_global_init],
515
516
GIT_UNSTASH_FLAGS($CURLDIR)
517
512
-AC_SUBST(NO_CURL)
518
+GIT_CONF_SUBST([NO_CURL])
519
520
#
521
# Define NO_EXPAT if you do not have expat installed. git-http-push is
@@ -523,7 +529,7 @@ AC_CHECK_LIB([expat], [XML_ParserCreate],
529
530
GIT_UNSTASH_FLAGS($EXPATDIR)
531
526
-AC_SUBST(NO_EXPAT)
532
+GIT_CONF_SUBST([NO_EXPAT])
533
534
#
535
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin and
@@ -569,8 +575,8 @@ LIBS="$old_LIBS"
575
576
GIT_UNSTASH_FLAGS($ICONVDIR)
577
572
-AC_SUBST(NEEDS_LIBICONV)
573
-AC_SUBST(NO_ICONV)
578
+GIT_CONF_SUBST([NEEDS_LIBICONV])
579
+GIT_CONF_SUBST([NO_ICONV])
580
581
if test -n "$NO_ICONV"; then
582
NEEDS_LIBICONV=
@@ -597,7 +603,7 @@ LIBS="$old_LIBS"
603
604
GIT_UNSTASH_FLAGS($ZLIB_PATH)
605
600
-AC_SUBST(NO_DEFLATE_BOUND)
606
+GIT_CONF_SUBST([NO_DEFLATE_BOUND])
607
608
#
609
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
@@ -605,7 +611,7 @@ AC_SUBST(NO_DEFLATE_BOUND)
611
AC_CHECK_LIB([c], [socket],
612
[NEEDS_SOCKET=],
613
[NEEDS_SOCKET=YesPlease])
608
-AC_SUBST(NEEDS_SOCKET)
614
+GIT_CONF_SUBST([NEEDS_SOCKET])
615
test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
616
617
#
@@ -613,40 +619,43 @@ test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
619
# libresolv provides some of the functions we would normally get
620
# from libc.
621
NEEDS_RESOLV=
616
-AC_SUBST(NEEDS_RESOLV)
622
#
623
# Define NO_INET_NTOP if linking with -lresolv is not enough.
624
# Solaris 2.7 in particular hos inet_ntop in -lresolv.
625
NO_INET_NTOP=
621
-AC_SUBST(NO_INET_NTOP)
626
AC_CHECK_FUNC([inet_ntop],
623
- [],
627
+ [],
628
[AC_CHECK_LIB([resolv], [inet_ntop],
625
- [NEEDS_RESOLV=YesPlease],
629
+ [NEEDS_RESOLV=YesPlease],
630
[NO_INET_NTOP=YesPlease])
631
])
632
+GIT_CONF_SUBST([NO_INET_NTOP])
633
#
634
# Define NO_INET_PTON if linking with -lresolv is not enough.
635
# Solaris 2.7 in particular hos inet_pton in -lresolv.
636
NO_INET_PTON=
632
-AC_SUBST(NO_INET_PTON)
637
AC_CHECK_FUNC([inet_pton],
634
- [],
638
+ [],
639
[AC_CHECK_LIB([resolv], [inet_pton],
636
- [NEEDS_RESOLV=YesPlease],
640
+ [NEEDS_RESOLV=YesPlease],
641
[NO_INET_PTON=YesPlease])
642
])
643
+GIT_CONF_SUBST([NO_INET_PTON])
644
#
645
# Define NO_HSTRERROR if linking with -lresolv is not enough.
646
# Solaris 2.6 in particular has no hstrerror, even in -lresolv.
647
NO_HSTRERROR=
648
AC_CHECK_FUNC([hstrerror],
644
- [],
649
+ [],
650
[AC_CHECK_LIB([resolv], [hstrerror],
646
- [NEEDS_RESOLV=YesPlease],
651
+ [NEEDS_RESOLV=YesPlease],
652
[NO_HSTRERROR=YesPlease])
653
])
649
-AC_SUBST(NO_HSTRERROR)
654
+GIT_CONF_SUBST([NO_HSTRERROR])
655
+
656
+dnl This must go after all the possible places for its initialization,
657
+dnl in the AC_CHECK_FUNC invocations above.
658
+GIT_CONF_SUBST([NEEDS_RESOLV])
659
#
660
# If any of the above tests determined that -lresolv is needed at
661
# build-time, also set it here for remaining configure-time checks.
@@ -655,13 +664,13 @@ test -n "$NEEDS_RESOLV" && LIBS="$LIBS -lresolv"
664
AC_CHECK_LIB([c], [basename],
665
[NEEDS_LIBGEN=],
666
[NEEDS_LIBGEN=YesPlease])
658
-AC_SUBST(NEEDS_LIBGEN)
667
+GIT_CONF_SUBST([NEEDS_LIBGEN])
668
test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"
669
670
AC_CHECK_LIB([c], [gettext],
671
[LIBC_CONTAINS_LIBINTL=YesPlease],
672
[LIBC_CONTAINS_LIBINTL=])
664
-AC_SUBST(LIBC_CONTAINS_LIBINTL)
673
+GIT_CONF_SUBST([LIBC_CONTAINS_LIBINTL])
674
675
#
676
# Define NO_GETTEXT if you don't want Git output to be translated.
@@ -669,7 +678,7 @@ AC_SUBST(LIBC_CONTAINS_LIBINTL)
678
AC_CHECK_HEADER([libintl.h],
679
[NO_GETTEXT=],
680
[NO_GETTEXT=YesPlease])
672
-AC_SUBST(NO_GETTEXT)
681
+GIT_CONF_SUBST([NO_GETTEXT])
682
683
if test -z "$NO_GETTEXT"; then
684
test -n "$LIBC_CONTAINS_LIBINTL" || LIBS="$LIBS -lintl"
@@ -682,19 +691,19 @@ AC_MSG_NOTICE([CHECKS for header files])
691
AC_CHECK_HEADER([sys/select.h],
692
[NO_SYS_SELECT_H=],
693
[NO_SYS_SELECT_H=UnfortunatelyYes])
685
-AC_SUBST(NO_SYS_SELECT_H)
694
+GIT_CONF_SUBST([NO_SYS_SELECT_H])
695
#
696
# Define NO_SYS_POLL_H if you don't have sys/poll.h
697
AC_CHECK_HEADER([sys/poll.h],
698
[NO_SYS_POLL_H=],
699
[NO_SYS_POLL_H=UnfortunatelyYes])
691
-AC_SUBST(NO_SYS_POLL_H)
700
+GIT_CONF_SUBST([NO_SYS_POLL_H])
701
#
702
# Define NO_INTTYPES_H if you don't have inttypes.h
703
AC_CHECK_HEADER([inttypes.h],
704
[NO_INTTYPES_H=],
705
[NO_INTTYPES_H=UnfortunatelyYes])
697
-AC_SUBST(NO_INTTYPES_H)
706
+GIT_CONF_SUBST([NO_INTTYPES_H])
707
#
708
# Define OLD_ICONV if your library has an old iconv(), where the second
709
# (input buffer pointer) parameter is declared with type (const char **).
@@ -717,23 +726,24 @@ AC_COMPILE_IFELSE([OLDICONVTEST_SRC],
726
727
GIT_UNSTASH_FLAGS($ICONVDIR)
728
720
-AC_SUBST(OLD_ICONV)
729
+GIT_CONF_SUBST([OLD_ICONV])
730
731
## Checks for typedefs, structures, and compiler characteristics.
732
AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics])
733
#
734
TYPE_SOCKLEN_T
735
case $ac_cv_type_socklen_t in
727
- yes) ;;
728
- *) AC_SUBST([SOCKLEN_T], [$git_cv_socklen_t_equiv]) ;;
736
+ yes) SOCKLEN_T='';;
737
+ *) SOCKLEN_T=$git_cv_socklen_t_equiv;;
738
esac
739
+GIT_CONF_SUBST([SOCKLEN_T])
740
741
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
742
AC_CHECK_MEMBER(struct dirent.d_ino,
743
[NO_D_INO_IN_DIRENT=],
744
[NO_D_INO_IN_DIRENT=YesPlease],
745
[#include <dirent.h>])
736
-AC_SUBST(NO_D_INO_IN_DIRENT)
746
+GIT_CONF_SUBST([NO_D_INO_IN_DIRENT])
747
#
748
# Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
749
# d_type in struct dirent (latest Cygwin -- will be fixed soonish).
@@ -741,7 +751,7 @@ AC_CHECK_MEMBER(struct dirent.d_type,
751
[NO_D_TYPE_IN_DIRENT=],
752
[NO_D_TYPE_IN_DIRENT=YesPlease],
753
[#include <dirent.h>])
744
-AC_SUBST(NO_D_TYPE_IN_DIRENT)
754
+GIT_CONF_SUBST([NO_D_TYPE_IN_DIRENT])
755
#
756
# Define NO_SOCKADDR_STORAGE if your platform does not have struct
757
# sockaddr_storage.
@@ -751,7 +761,7 @@ AC_CHECK_TYPE(struct sockaddr_storage,
761
#include <sys/types.h>
762
#include <sys/socket.h>
763
])
754
-AC_SUBST(NO_SOCKADDR_STORAGE)
764
+GIT_CONF_SUBST([NO_SOCKADDR_STORAGE])
765
#
766
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
767
AC_CHECK_TYPE([struct addrinfo],[
@@ -763,7 +773,7 @@ AC_CHECK_TYPE([struct addrinfo],[
773
#include <sys/socket.h>
774
#include <netdb.h>
775
])
766
-AC_SUBST(NO_IPV6)
776
+GIT_CONF_SUBST([NO_IPV6])
777
#
778
# Define NO_REGEX if you have no or inferior regex support in your C library.
779
AC_CACHE_CHECK([whether the platform regex can handle null bytes],
@@ -784,7 +794,7 @@ if test $ac_cv_c_excellent_regex = yes; then
794
else
795
NO_REGEX=YesPlease
796
fi
787
-AC_SUBST(NO_REGEX)
797
+GIT_CONF_SUBST([NO_REGEX])
798
#
799
# Define FREAD_READS_DIRECTORIES if your are on a system which succeeds
800
# when attempting to read from an fopen'ed directory.
@@ -804,7 +814,7 @@ if test $ac_cv_fread_reads_directories = yes; then
814
else
815
FREAD_READS_DIRECTORIES=
816
fi
807
-AC_SUBST(FREAD_READS_DIRECTORIES)
817
+GIT_CONF_SUBST([FREAD_READS_DIRECTORIES])
818
#
819
# Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()
820
# or vsnprintf() return -1 instead of number of characters which would
@@ -838,7 +848,7 @@ if test $ac_cv_snprintf_returns_bogus = yes; then
848
else
849
SNPRINTF_RETURNS_BOGUS=
850
fi
841
-AC_SUBST(SNPRINTF_RETURNS_BOGUS)
851
+GIT_CONF_SUBST([SNPRINTF_RETURNS_BOGUS])
852
853
854
## Checks for library functions.
@@ -849,47 +859,45 @@ AC_MSG_NOTICE([CHECKS for library functions])
859
AC_CHECK_HEADER([libgen.h],
860
[NO_LIBGEN_H=],
861
[NO_LIBGEN_H=YesPlease])
852
-AC_SUBST(NO_LIBGEN_H)
862
+GIT_CONF_SUBST([NO_LIBGEN_H])
863
#
864
# Define HAVE_PATHS_H if you have paths.h.
865
AC_CHECK_HEADER([paths.h],
866
[HAVE_PATHS_H=YesPlease],
867
[HAVE_PATHS_H=])
858
-AC_SUBST(HAVE_PATHS_H)
868
+GIT_CONF_SUBST([HAVE_PATHS_H])
869
#
870
# Define HAVE_LIBCHARSET_H if have libcharset.h
871
AC_CHECK_HEADER([libcharset.h],
872
[HAVE_LIBCHARSET_H=YesPlease],
873
[HAVE_LIBCHARSET_H=])
864
-AC_SUBST(HAVE_LIBCHARSET_H)
874
+GIT_CONF_SUBST([HAVE_LIBCHARSET_H])
875
# Define CHARSET_LIB if libiconv does not export the locale_charset symbol
876
# and libcharset does
877
CHARSET_LIB=
878
AC_CHECK_LIB([iconv], [locale_charset],
879
[],
880
[AC_CHECK_LIB([charset], [locale_charset],
871
- [CHARSET_LIB=-lcharset])
872
- ]
873
-)
874
-AC_SUBST(CHARSET_LIB)
881
+ [CHARSET_LIB=-lcharset])])
882
+GIT_CONF_SUBST([CHARSET_LIB])
883
#
884
# Define NO_STRCASESTR if you don't have strcasestr.
885
GIT_CHECK_FUNC(strcasestr,
886
[NO_STRCASESTR=],
887
[NO_STRCASESTR=YesPlease])
880
-AC_SUBST(NO_STRCASESTR)
888
+GIT_CONF_SUBST([NO_STRCASESTR])
889
#
890
# Define NO_STRTOK_R if you don't have strtok_r
891
GIT_CHECK_FUNC(strtok_r,
892
[NO_STRTOK_R=],
893
[NO_STRTOK_R=YesPlease])
886
-AC_SUBST(NO_STRTOK_R)
894
+GIT_CONF_SUBST([NO_STRTOK_R])
895
#
896
# Define NO_FNMATCH if you don't have fnmatch
897
GIT_CHECK_FUNC(fnmatch,
898
[NO_FNMATCH=],
899
[NO_FNMATCH=YesPlease])
892
-AC_SUBST(NO_FNMATCH)
900
+GIT_CONF_SUBST([NO_FNMATCH])
901
#
902
# Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the
903
# FNM_CASEFOLD GNU extension.
@@ -911,19 +919,19 @@ if test $ac_cv_c_excellent_fnmatch = yes; then
919
else
920
NO_FNMATCH_CASEFOLD=YesPlease
921
fi
914
-AC_SUBST(NO_FNMATCH_CASEFOLD)
922
+GIT_CONF_SUBST([NO_FNMATCH_CASEFOLD])
923
#
924
# Define NO_MEMMEM if you don't have memmem.
925
GIT_CHECK_FUNC(memmem,
926
[NO_MEMMEM=],
927
[NO_MEMMEM=YesPlease])
920
-AC_SUBST(NO_MEMMEM)
928
+GIT_CONF_SUBST([NO_MEMMEM])
929
#
930
# Define NO_STRLCPY if you don't have strlcpy.
931
GIT_CHECK_FUNC(strlcpy,
932
[NO_STRLCPY=],
933
[NO_STRLCPY=YesPlease])
926
-AC_SUBST(NO_STRLCPY)
934
+GIT_CONF_SUBST([NO_STRLCPY])
935
#
936
# Define NO_UINTMAX_T if your platform does not have uintmax_t
937
AC_CHECK_TYPE(uintmax_t,
@@ -931,43 +939,43 @@ AC_CHECK_TYPE(uintmax_t,
939
[NO_UINTMAX_T=YesPlease],[
940
#include <inttypes.h>
941
])
934
-AC_SUBST(NO_UINTMAX_T)
942
+GIT_CONF_SUBST([NO_UINTMAX_T])
943
#
944
# Define NO_STRTOUMAX if you don't have strtoumax in the C library.
945
GIT_CHECK_FUNC(strtoumax,
946
[NO_STRTOUMAX=],
947
[NO_STRTOUMAX=YesPlease])
940
-AC_SUBST(NO_STRTOUMAX)
948
+GIT_CONF_SUBST([NO_STRTOUMAX])
949
#
950
# Define NO_SETENV if you don't have setenv in the C library.
951
GIT_CHECK_FUNC(setenv,
952
[NO_SETENV=],
953
[NO_SETENV=YesPlease])
946
-AC_SUBST(NO_SETENV)
954
+GIT_CONF_SUBST([NO_SETENV])
955
#
956
# Define NO_UNSETENV if you don't have unsetenv in the C library.
957
GIT_CHECK_FUNC(unsetenv,
958
[NO_UNSETENV=],
959
[NO_UNSETENV=YesPlease])
952
-AC_SUBST(NO_UNSETENV)
960
+GIT_CONF_SUBST([NO_UNSETENV])
961
#
962
# Define NO_MKDTEMP if you don't have mkdtemp in the C library.
963
GIT_CHECK_FUNC(mkdtemp,
964
[NO_MKDTEMP=],
965
[NO_MKDTEMP=YesPlease])
958
-AC_SUBST(NO_MKDTEMP)
966
+GIT_CONF_SUBST([NO_MKDTEMP])
967
#
968
# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
969
GIT_CHECK_FUNC(mkstemps,
970
[NO_MKSTEMPS=],
971
[NO_MKSTEMPS=YesPlease])
964
-AC_SUBST(NO_MKSTEMPS)
972
+GIT_CONF_SUBST([NO_MKSTEMPS])
973
#
974
# Define NO_INITGROUPS if you don't have initgroups in the C library.
975
GIT_CHECK_FUNC(initgroups,
976
[NO_INITGROUPS=],
977
[NO_INITGROUPS=YesPlease])
970
-AC_SUBST(NO_INITGROUPS)
978
+GIT_CONF_SUBST([NO_INITGROUPS])
979
#
980
#
981
# Define NO_MMAP if you want to avoid mmap.
@@ -1049,9 +1057,9 @@ fi
1057
1058
CFLAGS="$old_CFLAGS"
1059
1052
-AC_SUBST(PTHREAD_CFLAGS)
1053
-AC_SUBST(PTHREAD_LIBS)
1054
-AC_SUBST(NO_PTHREADS)
1060
+GIT_CONF_SUBST([PTHREAD_CFLAGS])
1061
+GIT_CONF_SUBST([PTHREAD_LIBS])
1062
+GIT_CONF_SUBST([NO_PTHREADS])
1063
1064
## Output files
1065
AC_CONFIG_FILES(["${config_file}":"${config_in}"])