Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 68242b5

Browse files
committed
Some more header files and symbols.
Split the AC_CHECK_FUNCS() line using backslashes. Added FreeBSD support. Added XXX comment -- need to be more liberal or careful about -lreadline.
1 parent 554e96f commit 68242b5

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

configure.in

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ AC_MINIX
5858

5959
# checks for header files
6060
AC_HEADER_STDC
61-
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h sys/wait.h)
61+
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h ncurses.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h sys/wait.h)
6262
AC_HEADER_DIRENT
6363

6464
# checks for typedefs
@@ -123,6 +123,7 @@ then
123123
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
124124
DYNIX/ptx*) LDSHARED="ld -G";;
125125
Linux*) LDSHARED="gcc-elf -shared";;
126+
FreeBSD*) LDSHARED="ld -Bshareable";;
126127
*) LDSHARED="ld";;
127128
esac
128129
fi
@@ -138,6 +139,7 @@ then
138139
else CCSHARED="+z";
139140
fi;;
140141
Linux*) CCSHARED="-fpic";;
142+
FreeBSD*) CCSHARED="-fpic";;
141143
esac
142144
fi
143145
AC_MSG_RESULT($CCSHARED)
@@ -170,6 +172,8 @@ AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
170172
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
171173
fi
172174

175+
# XXX need to check whether libreadline.a actually exists there!
176+
# XXX Also, on some systems, it's libreadline.so...
173177
AC_MSG_CHECKING(for --with-readline)
174178
AC_ARG_WITH(readline, [--with-readline=DIRECTORY GNU readline], [
175179
AC_MSG_RESULT($withval)
@@ -209,7 +213,7 @@ LIBS="$LIBS -lthread"
209213
LIBOBJS="$LIBOBJS thread.o"])
210214
], AC_MSG_RESULT(no))
211215

212-
# -I${DLINCLDIR} is added to the compile rule for import.o
216+
# -I${DLINCLDIR} is added to the compile rule for importdl.o
213217
AC_SUBST(DLINCLDIR)
214218
DLINCLDIR=/
215219

@@ -239,7 +243,12 @@ DLINCLDIR=${dldir}
239243
LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
240244

241245
# checks for library functions
242-
AC_CHECK_FUNCS(chown clock dlopen ftime ftruncate gethostname_r gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt strftime symlink tcgetpgrp tcsetpgrp times truncate uname waitpid)
246+
AC_CHECK_FUNCS(chown clock dlopen ftime ftruncate \
247+
gethostname_r getpeername getpgrp getpid gettimeofday getwd \
248+
link lstat mkfifo nice readlink \
249+
select setgid setuid setsid setpgid setpgrp setvbuf \
250+
sigaction siginterrupt sigrelse strftime symlink \
251+
tcgetpgrp tcsetpgrp times truncate uname waitpid) \
243252
AC_REPLACE_FUNCS(dup2 getcwd strerror memmove)
244253
AC_CHECK_FUNC(getpgrp, AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
245254
AC_CHECK_FUNC(setpgrp, AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))

0 commit comments

Comments
 (0)