Skip to content

Commit 111a258

Browse files
committed
use apxs to query apache install paths
Signed-off-by: Elan Ruusamäe <[email protected]>
1 parent 8c84e5e commit 111a258

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/Makefile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
builddir=.
22

3-
ifneq (,$(wildcard /usr/share/apache2/build/special.mk))
4-
top_srcdir=/usr/share/apache2
5-
top_builddir=/usr/share/apache2
6-
include /usr/share/apache2/build/special.mk
7-
endif
8-
ifneq (,$(wildcard /usr/lib64/httpd/build/special.mk))
9-
top_srcdir=/etc/httpd
10-
top_builddir=/usr/lib64/httpd
11-
include /usr/lib64/httpd/build/special.mk
12-
endif
3+
# the used tools
4+
APXS=apxs
5+
APACHECTL=apachectl
6+
7+
top_builddir=$(shell $(APXS) -q exp_libexecdir)
8+
include $(top_builddir)/build/special.mk
9+
1310
ifneq (,$(wildcard /etc/debian_version))
1411
DISTRIBUTION := $(shell lsb_release -i | cut -f2)
1512
ifeq ($(DISTRIBUTION),Debian)
1613
DEFS=-DWITH_APACHE22
1714
endif
1815
endif
1916

20-
# the used tools
21-
APXS=apxs
22-
APACHECTL=apachectl
23-
2417
# additional defines, includes and libraries
2518
LIBS=-ljson-c -lz
2619

0 commit comments

Comments
 (0)