Proper autoconf test for sem_close's library; fixes trac #4523
authorIan Lynagh <igloo@earth.li>
Sat, 1 Jan 2011 20:11:50 +0000 (20:11 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 1 Jan 2011 20:11:50 +0000 (20:11 +0000)
configure.ac
unix.buildinfo.in

index a415609..346e1e1 100644 (file)
@@ -207,18 +207,9 @@ AC_SUBST([EXTRA_LIBS])
 # -{l,}pthread goo
 AC_CANONICAL_TARGET
 
-PTHREAD_CFLAGS=
-PTHREAD_LDFLAGS=
-PTHREAD_LIBS=
-case "$host_os" in
-openbsd*)
-       PTHREAD_CFLAGS=-pthread
-       PTHREAD_LDFLAGS=-pthread
-       ;;
-esac
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_LDFLAGS)
-AC_SUBST(PTHREAD_LIBS)
+AC_SEARCH_LIBS(sem_close, pthread,
+    [EXTRA_LIBS="$EXTRA_LIBS $ac_lib"],
+    [AC_MSG_NOTICE([Not found])])
 
 AC_CONFIG_FILES([unix.buildinfo])
 
index 4f70920..7283015 100644 (file)
@@ -1,4 +1,2 @@
 buildable: @BUILD_PACKAGE_BOOL@
-cc-options: @PTHREAD_CFLAGS@
-ld-options: @PTHREAD_LDFLAGS@
-extra-libraries: @EXTRA_LIBS@ @PTHREAD_LIBS@
+extra-libraries: @EXTRA_LIBS@