mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 08:24:43 +07:00
Add --with-libuev=PATH to configure script to use external libuEv
This commit makes it possible to build Finit with an external libuEv. Without this configure script option the libuev submodule is used. With an external libuEv we make sure to set the SONAME to libuev.so.1 to prevent any future runtime ABI issues. Fixes issue #4. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ HEADERS = finit.h plugin.h svc.h inetd.h helpers.h queue.h
|
||||
DISTFILES = LICENSE README ChangeLog finit.conf services
|
||||
OBJS = finit.o api.o client.o conf.o exec.o helpers.o pid.o sig.o \
|
||||
svc.o service.o plugin.o tty.o inetd.o event.o
|
||||
|
||||
DEPLIBS =
|
||||
TOPDIR = $(shell pwd)
|
||||
-include config.mk
|
||||
|
||||
@@ -52,9 +52,6 @@ CPPFLAGS += -U_FORTIFY_SOURCE
|
||||
CPPFLAGS += -I$(TOPDIR)
|
||||
CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
|
||||
CPPFLAGS += -DVERSION=\"$(VERSION)\" -DWHOAMI=\"`whoami`@`hostname`\"
|
||||
LDFLAGS += -L$(TOPDIR)/libuev
|
||||
DEPLIBS += libuev/libuev.a
|
||||
LDLIBS += -luev
|
||||
|
||||
include common.mk
|
||||
|
||||
@@ -89,7 +86,9 @@ install-exec: all
|
||||
ifndef LIBITE
|
||||
$(MAKE) -C libite install-exec
|
||||
endif
|
||||
ifndef LIBUEV
|
||||
$(MAKE) -C plugins install
|
||||
endif
|
||||
|
||||
install-data:
|
||||
@$(INSTALL) -d $(DESTDIR)$(datadir)
|
||||
@@ -108,7 +107,9 @@ install-dev:
|
||||
ifndef LIBITE
|
||||
$(MAKE) -C libite install-dev
|
||||
endif
|
||||
ifndef LIBUEV
|
||||
$(MAKE) -C libuev install-dev
|
||||
endif
|
||||
|
||||
install: install-exec install-data install-dev
|
||||
|
||||
@@ -123,7 +124,9 @@ uninstall-exec:
|
||||
ifndef LIBITE
|
||||
$(MAKE) -C libite uninstall
|
||||
endif
|
||||
ifndef LIBUEV
|
||||
$(MAKE) -C plugins uninstall
|
||||
endif
|
||||
|
||||
uninstall-data:
|
||||
@for file in $(DISTFILES); do \
|
||||
@@ -143,7 +146,9 @@ clean:
|
||||
ifndef LIBITE
|
||||
+$(MAKE) -C libite $@
|
||||
endif
|
||||
ifndef LIBUEV
|
||||
+$(MAKE) -C libuev $@
|
||||
endif
|
||||
-@$(RM) $(OBJS) $(DEPS) $(EXEC)
|
||||
|
||||
distclean: clean
|
||||
@@ -151,7 +156,9 @@ distclean: clean
|
||||
ifndef LIBITE
|
||||
+$(MAKE) -C libite $@
|
||||
endif
|
||||
ifndef LIBUEV
|
||||
+$(MAKE) -C libuev $@
|
||||
endif
|
||||
-@$(RM) $(JUNK) config.mk config.h unittest *.o *.html
|
||||
|
||||
check:
|
||||
|
||||
@@ -97,6 +97,12 @@ result()
|
||||
echo "Libite (LITE) : $libite + {/lib, /include}"
|
||||
fi
|
||||
|
||||
if [ x"$libuev" = x"" ]; then
|
||||
echo "LibuEv : Built-in"
|
||||
else
|
||||
echo "LibuEv : $libuev + {/lib, /include}"
|
||||
fi
|
||||
|
||||
if [ $verbose -ne 1 ]; then
|
||||
echo "Quiet Finit : YES"
|
||||
else
|
||||
@@ -157,8 +163,10 @@ usage()
|
||||
echo " --with-username=USER User for 'startx' .conf option, default: root"
|
||||
echo " --with-hostname=NAME Hostname, if /etc/hostname is missing, default: noname"
|
||||
echo " --with-runlevel=LEVEL Runlevel to switch to after bootstrap (S), default: 2"
|
||||
echo " --with-libite=PATH Look for libite in PATH/include and PATH/lib"
|
||||
echo " This is for disabling the use of built-in libite."
|
||||
echo " --with-libite=PATH Look for libite in PATH/include and PATH/lib"
|
||||
echo " This is for disabling the use of built-in libite."
|
||||
echo " --with-libuev=PATH Look for libuEv in PATH/include and PATH/lib"
|
||||
echo " This is for disabling the use of built-in libuEv."
|
||||
echo
|
||||
echo " --enable-embedded Embedded defaults, BusBox getty, mdev etc."
|
||||
echo " --enable-dbus Enable D-Bus plugin. Note: install plugin as well!"
|
||||
@@ -263,6 +271,10 @@ while [ "$*" != "" ]; do
|
||||
libite="$arg"
|
||||
;;
|
||||
|
||||
with-libuev)
|
||||
libuev="$arg"
|
||||
;;
|
||||
|
||||
enable-debug)
|
||||
debug=1
|
||||
;;
|
||||
@@ -369,7 +381,18 @@ if [ x"$libite" != x"" ]; then
|
||||
else
|
||||
echo "LDFLAGS += -L\$(TOPDIR)/libite" >> config.mk
|
||||
echo "LDLIBS += -lite" >> config.mk
|
||||
echo "DEPLIBS = libite/libite.a" >> config.mk
|
||||
echo "DEPLIBS += libite/libite.a" >> config.mk
|
||||
fi
|
||||
|
||||
if [ x"$libuev" != x"" ]; then
|
||||
echo "LIBUEV = $libuev" >> config.mk
|
||||
echo "CFLAGS += -I\$(LIBUEV)/include" >> config.mk
|
||||
echo "LDFLAGS += -L\$(LIBUEV)/lib" >> config.mk
|
||||
echo "LDLIBS += -l:libuev.so.1" >> config.mk
|
||||
else
|
||||
echo "LDFLAGS += -L\$(TOPDIR)/libuev" >> config.mk
|
||||
echo "LDLIBS += -luev" >> config.mk
|
||||
echo "DEPLIBS += libuev/libuev.a" >> config.mk
|
||||
fi
|
||||
|
||||
echo >> config.mk
|
||||
|
||||
Reference in New Issue
Block a user