summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure72
-rw-r--r--doc/index.html2
-rw-r--r--doc/license.html2
-rw-r--r--doc/upgrade.html3
-rw-r--r--package/info2
5 files changed, 51 insertions, 30 deletions
diff --git a/configure b/configure
index e4a1866..abaa7fd 100755
--- a/configure
+++ b/configure
@@ -164,6 +164,33 @@ trytypesize() {
echo " ... $type_size"
}
+tryrtlib () {
+ echo "Checking whether system has $3..."
+ if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -c -o try$2.o src/sysdeps/try$2.c 2>/dev/null ; then
+ if $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o /dev/null try$2.o 2>/dev/null ; then
+ rm -f try$2.o
+ eval "$1="
+ echo " ... yes"
+ return 0
+ elif $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o /dev/null try$2.o -lrt 2>/dev/null ; then
+ rm -f try$2.o
+ eval "$1=-lrt"
+ echo " ... yes, with -lrt"
+ rm -f try$1.o
+ return 0
+ else
+ rm -f try$2.o
+ eval "$1="
+ echo " ... no"
+ return 1
+ fi
+ else
+ eval "$1="
+ echo " ... no"
+ return 1
+ fi
+}
+
# Actual script
CC_AUTO=
@@ -410,46 +437,40 @@ EOF
rm -f trylsock.o
echo "$socket_lib" > $sysdeps/socket.lib
- echo "Checking whether clock functions are available..."
- rt_lib=
- if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -c -o tryclockrt.o src/sysdeps/tryclockrt.c 2>/dev/null ; then
- if $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o /dev/null tryclockrt.o 2>/dev/null ; then
- hasclock=true
- echo " ... yes"
- elif $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o /dev/null tryclockrt.o -lrt 2>/dev/null ; then
- hasclock=true
- echo " ... yes, with -lrt"
- rt_lib=-lrt
- else
- hasclock=false
- fi
- rm -f tryclockrt.o
- else
- hasclock=false
- fi
- echo "$rt_lib" > $sysdeps/rt.lib
+ hasclock=true
+ tryrtlib clock_lib clockrt 'clock_gettime()' || hasclock=false
if $clockrt ; then
- echo "$rt_lib" > $sysdeps/sysclock.lib
- echo "$rt_lib" > $sysdeps/tainnow.lib
+ echo "$clock_lib" > $sysdeps/sysclock.lib
+ echo "$clock_lib" > $sysdeps/tainnow.lib
else
echo > $sysdeps/sysclock.lib
if $clockmon ; then
- echo "$rt_lib" > $sysdeps/tainnow.lib
+ echo "$clock_lib" > $sysdeps/tainnow.lib
else
echo > $sysdeps/tainnow.lib
fi
fi
if $hasclock ; then
- rm -f tryclockrt
echo 'clockrt: yes' >> $sysdeps/sysdeps
echo "#define ${package_macro_name}_HASCLOCKRT" >> $sysdeps/sysdeps.h
- choose cl clockmon CLOCKMON CLOCK_MONOTONIC $rt_lib
+ choose cl clockmon CLOCKMON CLOCK_MONOTONIC $clock_lib
else
echo 'clockrt: no' >> $sysdeps/sysdeps
echo "#undef ${package_macro_name}_HASCLOCKRT" >> $sysdeps/sysdeps.h
- echo ' ... no'
fi
+ hasspawn=true
+ tryrtlib spawn_lib posixspawn 'posix_spawn()' || hasspawn=false
+ echo "$spawn_lib" > $sysdeps/spawn.lib
+ if $hasspawn ; then
+ echo 'posixspawn: yes' >> $sysdeps/sysdeps
+ echo "#define ${package_macro_name}_HASPOSIXSPAWN" >> $sysdeps/sysdeps.h
+ else
+ echo 'posixspawn: no' >> $sysdeps/sysdeps
+ echo "#undef ${package_macro_name}_HASPOSIXSPAWN" >> $sysdeps/sysdeps.h
+ fi
+
+
echo "Checking system endianness..."
$CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o tryendianness src/sysdeps/tryendianness.c
endianness=$(./tryendianness) || fail "$0: unable to determine endianness"
@@ -480,7 +501,6 @@ EOF
choose cl openat OPENAT 'openat()'
choose cl linkat LINKAT 'linkat()'
choose clr pipe2 PIPE2 'pipe2()'
- choose cl posixspawn POSIXSPAWN 'posix_spawn()' $rt_lib
choose clr ppoll PPOLL 'ppoll()'
choose cl revoke REVOKE 'revoke()'
choose cl sendfile SENDFILE 'sendfile()'
@@ -538,7 +558,7 @@ sproot := $sproot
home := $home
exthome := ${exthome}
ipv6 := ${ipv6}
-RT_LIB := ${rt_lib}
+SPAWN_LIB := ${spawn_lib}
SOCKET_LIB := ${socket_lib}
SYSCLOCK_LIB := ${sysclock_lib}
TAINNOW_LIB := ${tainnow_lib}
diff --git a/doc/index.html b/doc/index.html
index 903cb3a..e7c6df5 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -60,7 +60,7 @@ with a standard C development environment </li>
<h3> Download </h3>
<ul>
- <li> The current released version of skalibs is <a href="skalibs-2.3.11.0.tar.gz">2.3.11.0</a>. </li>
+ <li> The current released version of skalibs is <a href="skalibs-2.4.0.0.tar.gz">2.4.0.0</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="http://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/">skalibs
git repository</a>:
diff --git a/doc/license.html b/doc/license.html
index 68d8add..5d278d0 100644
--- a/doc/license.html
+++ b/doc/license.html
@@ -74,7 +74,7 @@ color, or different text font. </li>
<p>
<em>I am aware that the previous restrictions sound completely
ridiculous while the official skalibs documentation is incomplete.
-As of 2.3.11.0, I'm not going to enforce those restrictions, but if you're
+As of 2.4.0.0, I'm not going to enforce those restrictions, but if you're
going to provide documentation for skalibs, don't keep it to yourself,
please send it to me instead. :-) </em>
</p>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index f2a16cc..efd6ec7 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,11 +18,12 @@
<h1> What has changed in skalibs </h1>
-<h2> in 2.3.11.0 </h2>
+<h2> in 2.4.0.0 </h2>
<ul>
<li> More support for advanced fd callbacks in <tt>unixmessage_sender</tt> and <tt>unixconnection</tt>. </li>
<li> <tt>ipc_timed_send()</tt>, <tt>ipc_timed_recv()</tt> </li>
+ <li> rt.lib sysdep removed; spawn.lib sysdep added </li>
</ul>
<h2> in 2.3.10.0 </h2>
diff --git a/package/info b/package/info
index 6a886b9..9ec601b 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=skalibs
-version=2.3.11.0
+version=2.4.0.0
category=prog
package_macro_name=SKALIBS