Skip to content

Commit 577f2fa

Browse files
committed
fix build of lib for ubuntu/etc
1 parent 9b2b0fa commit 577f2fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

config.m4

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@ PHP_ARG_WITH(system-libgit2, whether to build with system libgit2,
55
[ --with-system-libgit2 Build php-git2 with system libgit2], no, no)
66

77
if test $PHP_GIT2 != "no"; then
8-
PHP_SUBST(GIT2_SHARED_LIBADD)
9-
108
if test "$PHP_SYSTEM_LIBGIT2" != "no"; then
119
PHP_ADD_LIBRARY(git2,, GIT2_SHARED_LIBADD)
1210
else
1311
if ! test -f libgit2/build/libgit2.a; then
1412
echo "Please run ./libgit2_build.sh or configure with --with-system-libgit2"
1513
exit 1
1614
fi
17-
CFLAGS="$CFLAGS -Wl,libgit2/build/libgit2.a"
1815
PHP_ADD_INCLUDE([libgit2/include])
19-
PHP_SUBST([CFLAGS])
20-
PHP_ADD_LIBRARY(ssh2,, GIT2_SHARED_LIBADD)
2116
PHP_ADD_LIBRARY(curl,, GIT2_SHARED_LIBADD)
2217
PHP_ADD_LIBRARY(rt,, GIT2_SHARED_LIBADD)
2318
PHP_ADD_LIBRARY(http_parser,, GIT2_SHARED_LIBADD)
19+
PHP_ADD_LIBRARY(ssh2,, GIT2_SHARED_LIBADD)
20+
PHP_ADD_LIBRARY_WITH_PATH(git2, libgit2/build, GIT2_SHARED_LIBADD)
2421
fi
2522

2623
PHP_NEW_EXTENSION(git2, php_git2.c git2_exception.c git2_repository.c git2_config.c git2_config_entry.c git2_reference.c git2_commit.c git2_remote.c git2_tree.c git2_tree_entry.c git2_blob.c, $ext_shared)
24+
PHP_SUBST(GIT2_SHARED_LIBADD)
2725
fi

0 commit comments

Comments
 (0)