build: Fix libraries for HP-UX.
authorNIIBE Yutaka <gniibe@fsij.org>
Sun, 27 May 2018 23:55:15 +0000 (08:55 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Sun, 27 May 2018 23:55:15 +0000 (08:55 +0900)
* configure.ac: HP-UX requires -lpthread and -lrt.

--

Since HP-UX has stub for pthread functions in C library, it
is required to link -lpthread.  POSIX semaphore functions like
sem_init is required to link -lrt.  Tested on ia64-hp-hpux11.31.

Reported-by: John Hirsch
GnuPG-bug-id: 3980
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
configure.ac

index ae1dee6..3914d33 100644 (file)
@@ -120,7 +120,7 @@ case "${host}" in
     *-*-aix*)
         have_fork_unsafe_semaphore=yes
         ;;
     *-*-aix*)
         have_fork_unsafe_semaphore=yes
         ;;
-    *-*-dragonfly*|*-*-freebsd*|*-*-netbsd*)
+    *-*-dragonfly*|*-*-freebsd*|*-*-netbsd*|*-*-hpux*)
         LIBS="-lpthread $LIBS"
         AC_SEARCH_LIBS([sem_init],[rt])
         ;;
         LIBS="-lpthread $LIBS"
         AC_SEARCH_LIBS([sem_init],[rt])
         ;;