Skip to content

Commit ba3e5b2

Browse files
committed
Configuration: add include paths to git2r after search of libraries
Signed-off-by: Stefan Widgren <[email protected]>
1 parent 3a9674e commit ba3e5b2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

configure

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,7 +3494,7 @@ fi
34943494

34953495

34963496
# Handle optional include and library paths
3497-
GIT2R_CPPFLAGS="-I. -Ilibgit2 -Ilibgit2/include -Ihttp-parser"
3497+
GIT2R_CPPFLAGS=
34983498

34993499
# zlib include and library path
35003500

@@ -4064,11 +4064,14 @@ fi
40644064

40654065

40664066
# Include and use regex on solaris
4067-
CPPFLAGS="${CPPFLAGS} -Iregex"
4067+
CPPFLAGS="-Iregex ${CPPFLAGS}"
40684068
GIT2R_SRC_REGEX=regex/regex.o
40694069
;;
40704070
esac
40714071

4072+
# Add include paths for git2r
4073+
CPPFLAGS="-I. -Ilibgit2 -Ilibgit2/include -Ihttp-parser ${CPPFLAGS}"
4074+
40724075
# Add definitions
40734076
CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DGIT_OPENSSL"
40744077

configure.ac

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AC_DEFUN([AC_PROG_PKGCONFIG], [AC_CHECK_PROG(PKGCONFIG,pkg-config,yes)])
2929
AC_PROG_PKGCONFIG
3030

3131
# Handle optional include and library paths
32-
GIT2R_CPPFLAGS="-I. -Ilibgit2 -Ilibgit2/include -Ihttp-parser"
32+
GIT2R_CPPFLAGS=
3333

3434
# zlib include and library path
3535
AC_ARG_WITH([zlib-include],
@@ -226,11 +226,14 @@ case "${host_os}" in
226226
AC_SEARCH_LIBS(gethostbyname, [nsl socket])
227227

228228
# Include and use regex on solaris
229-
CPPFLAGS="${CPPFLAGS} -Iregex"
229+
CPPFLAGS="-Iregex ${CPPFLAGS}"
230230
GIT2R_SRC_REGEX=regex/regex.o
231231
;;
232232
esac
233233

234+
# Add include paths for git2r
235+
CPPFLAGS="-I. -Ilibgit2 -Ilibgit2/include -Ihttp-parser ${CPPFLAGS}"
236+
234237
# Add definitions
235238
CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DGIT_OPENSSL"
236239

0 commit comments

Comments
 (0)