added support for --sysconfdir

This commit is contained in:
rofl0r 2012-01-30 18:26:38 +01:00
parent f4e4c8c2b1
commit 0ee539f31c
2 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,7 @@ bindir = $(exec_prefix)/bin
prefix = /usr/local/ prefix = /usr/local/
includedir = $(prefix)/include includedir = $(prefix)/include
libdir = $(prefix)/lib libdir = $(prefix)/lib
sysconfdir=$(prefix)/etc
SRCS = $(sort $(wildcard src/*.c)) SRCS = $(sort $(wildcard src/*.c))
OBJS = $(SRCS:.c=.o) OBJS = $(SRCS:.c=.o)
@ -47,7 +48,7 @@ all: $(ALL_LIBS) $(ALL_TOOLS)
install: install:
install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) $(bindir)/ install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) $(bindir)/
install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(libdir)/ install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(libdir)/
install $(INSTALL_FLAGS) 644 src/proxychains.conf $(prefix)/etc/ install $(INSTALL_FLAGS) 644 src/proxychains.conf $(sysconfdir)/
clean: clean:
rm -f $(ALL_LIBS) rm -f $(ALL_LIBS)

8
configure vendored
View File

@ -11,11 +11,12 @@ spliteq() {
parsearg() { parsearg() {
case "$1" in case "$1" in
--prefix=*) prefix=$(spliteq "$1");; --prefix=*) prefix=`spliteq $1`;;
--exec_prefix=*) exec_prefix=`spliteq $1`;; --exec_prefix=*) exec_prefix=`spliteq $1`;;
--bindir=*) bindir=`spliteq $1`;; --bindir=*) bindir=`spliteq $1`;;
--libdir=*) libdir=`spliteq $1`;; --libdir=*) libdir=`spliteq $1`;;
--includedir=*) includedir=`spliteq $1`;; --includedir=*) includedir=`spliteq $1`;;
--sysconfdir=*) sysconfdir=`spliteq $1`;;
esac esac
} }
@ -42,6 +43,10 @@ if [ ! $includedir ] ; then
includedir=$prefix/include includedir=$prefix/include
fi fi
if [ ! $sysconfdir ] ; then
sysconfdir=$prefix/etc
fi
if [ ! $bindir ] ; then if [ ! $bindir ] ; then
bindir=$exec_prefix/bin bindir=$exec_prefix/bin
fi fi
@ -58,6 +63,7 @@ echo exec_prefix=$exec_prefix>>config.mak
echo bindir=$bindir>>config.mak echo bindir=$bindir>>config.mak
echo libdir=$libdir>>config.mak echo libdir=$libdir>>config.mak
echo includedir=$includedir>>config.mak echo includedir=$includedir>>config.mak
echo sysconfdir=$sysconfdir>>config.mak
if ismac ; then if ismac ; then
echo LDSO_SUFFIX=dylib>>config.mak echo LDSO_SUFFIX=dylib>>config.mak
echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak