mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 11:49:50 +00:00
update configure script
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@615 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
1d144326de
commit
4e38904812
@ -155,6 +155,8 @@ install:
|
||||
$(INSTALL) -m 0644 libkqueue.so $(DESTDIR)$(LIBDIR)/libkqueue.so.0.0
|
||||
/usr/bin/test -e $(DESTDIR)$(INCLUDEDIR)/kqueue/sys || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/kqueue/sys
|
||||
$(INSTALL) -m 644 include/sys/event.h $(DESTDIR)$(INCLUDEDIR)/kqueue/sys
|
||||
rm -f $(DESTDIR)$(LIBDIR)/libkqueue.so
|
||||
ln -s libkqueue.so.0.0 $(DESTDIR)$(LIBDIR)/libkqueue.so
|
||||
|
||||
kqtest: test/main.o test/kevent.o test/test.o test/proc.o test/read.o test/signal.o test/timer.o test/vnode.o test/user.o
|
||||
$(LD) -o kqtest -L . -Wl,-rpath,. -L . $(LDFLAGS) test/main.o test/kevent.o test/test.o test/proc.o test/read.o test/signal.o test/timer.o test/vnode.o test/user.o -lpthread -lrt -lkqueue $(LDADD)
|
||||
|
61
configure
vendored
61
configure
vendored
@ -58,6 +58,11 @@ Common options:
|
||||
EOF
|
||||
}
|
||||
|
||||
err() {
|
||||
echo "*** ERROR *** $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "# Automatically generated by ./configure -- do not edit" > config.mk
|
||||
for arg in $*
|
||||
do
|
||||
@ -65,21 +70,34 @@ do
|
||||
key=`echo $arg | sed "s/^--//; s/=.*//"`
|
||||
val=`echo $arg | sed "s/.*=//"`
|
||||
uc_key=`echo "$key" | tr "a-z" "A-Z" | tr "-" "_"`
|
||||
echo key=$key -- val=$val
|
||||
case $key in
|
||||
"help")
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
bindir|datadir|datarootdir|docdir|eprefix|includedir|infodir|libdir|libexecdir|localedir|localstatedir|mandir|pkgdatadir|pkgincludedir|pkglibdir|prefix|sbindir|sharedstatedir|sysconfdir)
|
||||
bindir|datadir|datarootdir|docdir|includedir|infodir|libdir|libexecdir|localedir|localstatedir|mandir|pkgdatadir|pkgincludedir|pkglibdir|prefix|sbindir|sharedstatedir|sysconfdir)
|
||||
echo "$uc_key=$val" >> config.mk
|
||||
;;
|
||||
exec-prefix)
|
||||
echo "EPREFIX=$val" >> config.mk
|
||||
;;
|
||||
program-prefix)
|
||||
if [ "$val" != "" ] ; then err "FIXME - not implemented" ; fi
|
||||
;;
|
||||
disable-static)
|
||||
echo "$uc_key=1" >> config.mk
|
||||
;;
|
||||
build|host)
|
||||
# TODO: we should split this up, and override the other Makeconf
|
||||
# variables like *_VENDOR, *_ARCH, *_CPU, *_KERNEL, *_SYSTEM
|
||||
echo "$uc_key=$val" >> config.mk
|
||||
;;
|
||||
disable-option-checking)
|
||||
# Not implemented, this behavior is the default (for now)
|
||||
;;
|
||||
disable-dependency-tracking)
|
||||
# Not implemented, dependency tracking is done in Ruby (for now)
|
||||
;;
|
||||
*)
|
||||
echo "Warning: unrecognized option: $arg"
|
||||
;;
|
||||
@ -87,5 +105,42 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
printf "checking for a C compiler... "
|
||||
for cmd in cc gcc gcc4 clang
|
||||
do
|
||||
$cmd --version >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] ; then cc="$cmd" ; break ; fi
|
||||
done
|
||||
if [ -n "$CC" ] ; then cc="$CC" ; fi
|
||||
if [ -n "$cc" ] ; then
|
||||
echo "$cc"
|
||||
echo "CC=$cc" >> config.mk
|
||||
if [ "$cc" != "cc" ] ; then echo "LD=$cc" >> config.mk ; fi
|
||||
if [ -n "$CFLAGS" ] ; then echo "CFLAGS=$CFLAGS" >> config.mk ; fi
|
||||
else
|
||||
echo "not found"
|
||||
err "Please install a compiler and add it to your PATH"
|
||||
fi
|
||||
|
||||
printf "checking for a usable make command... "
|
||||
for cmd in make gmake
|
||||
do
|
||||
$cmd --version >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] ; then make="$cmd" ; break ; fi
|
||||
done
|
||||
if [ -n "$make" ] ; then
|
||||
echo "yes"
|
||||
echo "MAKE=$make" >> config.mk
|
||||
else
|
||||
echo "not found"
|
||||
err "Please install GNU Make and add it to your PATH as either make or gmake"
|
||||
fi
|
||||
|
||||
# Allow additional variables from the environment to override the defaults
|
||||
#
|
||||
test -n "$LD" && echo "LD=$LD" >> config.mk
|
||||
test -n "$LDFLAGS" && echo "LDFLAGS=$LDFLAGS" >> config.mk
|
||||
# TODO: need to add Makefile support for: LIBS, CPP, CPPFLAGS
|
||||
|
||||
rm -f config.h
|
||||
make config.h
|
||||
$make config.h
|
||||
|
Loading…
Reference in New Issue
Block a user