3 AC_INIT([stdc-pkgconfig],[0.0.1.0])
9 test "$pkgconfigdir" || pkgconfigdir="$libdir/pkgconfig"
10 AC_SUBST(pkgconfigdir)
12 dnl ========== enable pthread stuff ==========
13 sinclude(m4/cf.pthread.m4)
15 dnl ========== libm / math ==========
16 sinclude(m4/cf.math.m4)
18 dnl Check for functions
19 dnl sinclude(m4/acx_gettimeofday.m4)
20 dnl ACX_CHECK_GETTIMEOFDAY
22 dnl Check for getmntent / setmntent
23 dnl AC_CHECK_FUNCS(setmntent getmntent)
24 dnl if test "$ac_cv_func_getmntent" = "yes"; then
25 dnl AC_COMPILE_IFELSE([
26 dnl #include <stdio.h>
27 dnl #include <sys/mnttab.h>
36 dnl [have_libc_mntent=yes
37 dnl AC_MSG_RESULT(yes)],
38 dnl [AC_MSG_RESULT(no)])
41 dnl Check for setpgrp()
42 dnl sinclude(m4/acx_setpgrp.m4)
45 dnl Check for system header files
48 dnl AC_HEADER_SYS_WAIT
49 dnl AC_CHECK_HEADERS(ctype.h)
50 dnl AC_CHECK_HEADERS(fcntl.h)
51 dnl AC_CHECK_HEADERS(grp.h)
52 dnl AC_CHECK_HEADERS(pwd.h)
53 dnl AC_CHECK_HEADERS(libio.h)
54 dnl AC_CHECK_HEADERS(locale.h)
55 dnl AC_CHECK_HEADERS(sys/types.h)
56 dnl AC_CHECK_HEADERS(sys/stat.h)
57 dnl AC_CHECK_HEADERS(sys/uio.h)
58 dnl AC_HEADER_SYS_WAIT
60 dnl AC_CHECK_HEADERS(sys/timeb.h)
61 dnl AC_CHECK_HEADERS(sys/param.h)
62 dnl AC_CHECK_HEADERS(sys/ioctl.h)
63 dnl AC_CHECK_HEADERS(sys/mount.h)
64 dnl AC_CHECK_HEADERS(setjmp.h)
65 dnl AC_CHECK_HEADERS(stdarg.h)
66 dnl if test "$EDITLINE_FLG" = "Y"; then
67 dnl AC_CHECK_HEADERS(termio.h termios.h)
69 dnl AC_DEFINE(HAVE_EDITLINE_H, 1, [Define this if internal editline.h is in use])
71 dnl AC_CHECK_HEADERS(unistd.h)
72 dnl AC_CHECK_HEADERS(crypt.h)
73 dnl AC_CHECK_HEADERS(aio.h)
74 dnl AC_CHECK_HEADERS(mntent.h mnttab.h sys/mntent.h sys/mnttab.h)
75 dnl AC_CHECK_HEADERS(socket.h sys/socket.h sys/sockio.h winsock2.h)
77 dnl Check for libraries
78 dnl AC_CHECK_LIB(dl, main)
80 dnl AC_CHECK_FUNCS(time times)
81 dnl AC_SEARCH_LIBS(gethostname,nsl)
82 dnl AC_SEARCH_LIBS(connect,socket)
83 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
84 dnl AC_CHECK_FUNCS(strncasecmp strnicmp)
85 dnl AC_SEARCH_LIBS(dirname, gen)
86 dnl AC_CHECK_FUNCS(dirname)
87 dnl AC_CHECK_FUNCS(sigaction setitimer)
88 dnl AC_CHECK_FUNCS(snprintf vsnprintf)
89 dnl AC_CHECK_FUNCS(swab _swab)
91 dnl AC_CHECK_FUNCS(mmap)
93 dnl AC_CHECK_FUNCS(setpgid)
95 dnl AC_CHECK_FUNCS(flock)
96 dnl AC_CHECK_FUNCS(initgroups)
97 dnl AC_CHECK_FUNCS(getpagesize)
98 dnl AC_CHECK_FUNCS(pread pwrite)
99 dnl AC_CHECK_FUNCS(getcwd getwd)
100 dnl AC_CHECK_FUNCS(tcgetattr strdup)
101 dnl AC_CHECK_FUNCS(mkstemp)
102 dnl AC_CHECK_FUNCS(llrint)
103 dnl AC_CHECK_FUNCS(localtime_r)
104 dnl AC_CHECK_FUNCS(gmtime_r)
106 # Checks for typedefs, structures, and compiler characteristics.
107 dnl AC_CHECK_TYPES([socklen_t],,,[#include <sys/socket.h>])
108 dnl AH_BOTTOM([#ifndef HAVE_SOCKLEN_T
109 dnl typedef int socklen_t;
111 dnl AC_CHECK_TYPES([semun])
112 dnl if test "$ac_cv_type_semun" = "no"; then
113 dnl AC_MSG_CHECKING(if sem.h defines semun)
114 dnl AC_COMPILE_IFELSE([
115 dnl #include <sys/types.h>
116 dnl #include <sys/ipc.h>
117 dnl #include <sys/sem.h>
124 dnl [ac_cv_type_semun=yes; AC_DEFINE(HAVE_SEMUN) AC_MSG_RESULT(yes)],
125 dnl [AC_MSG_RESULT(no)])
128 dnl AC_CHECK_TYPES([struct XDR::xdr_ops],,,[#include <rpc/rpc.h>
129 dnl #include <rpc/xdr.h>])
130 dnl AC_CHECK_TYPES([struct xdr_ops],,,[#include <rpc/rpc.h>
131 dnl #include <rpc/xdr.h>])
133 dnl dnl EKU: Add any platform specific tests below
134 dnl case "$PLATFORM" in
135 dnl FREEBSD|GENTOOFREEBSD)
136 dnl dnl the AC_CHECK_TYPES for socklen_t doesn't include sys/socket.h
137 dnl dnl so test for socklen_t with sys/socket.h included
138 dnl AC_MSG_CHECKING(if sys/socket.h defines socklen_t)
139 dnl AC_COMPILE_IFELSE([
140 dnl #include <sys/types.h>
141 dnl #include <sys/socket.h>
148 dnl [AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes)],
149 dnl [AC_MSG_RESULT(no)])
150 dnl dnl define HAVE_POSIX_THREADS for FreeBSD 4.x support
154 dnl dnl kkuznetsov: Solaris always check for -lnsl and use Sun thread (!not posix)
156 dnl AC_CHECK_LIB(nsl, gethostname, XE_APPEND(-lnsl,LIBS))
157 dnl AC_CHECK_LIB(thread, thr_create, XE_PREPEND(-lthread,LIBS))
159 dnl # if test "$EDITLINE_FLG" = "Y"; then
160 dnl # AC_CHECK_LIB(termcap, main, XE_APPEND(-ltermcap,EDITLINE_A))
162 dnl AC_CHECK_LIB(rt, main)
164 dnl AC_CHECK_TYPES([caddr_t])
166 dnl AC_ARG_WITH(sfio,
167 dnl AS_HELP_STRING([--with-sfio=PATH],
168 dnl [use sfio (replacement stdio on Solaris) (default=no)]),
169 dnl [ac_cv_use_sfio=$withval],[ac_cv_use_sfio=no])
171 dnl if test "$ac_cv_use_sfio" = "no"; then
176 dnl AC_CHECK_LIB(sfio, main)
177 dnl dnl dnl Kkuznetsov: using sfio-mt looks like double protecting of FILE*
178 dnl dnl and I avoid to use vthread based on posix threading
179 dnl #AC_CHECK_LIB(sfio-mt, main,,
180 dnl #AC_MSG_ERROR([sfio library not found]),-lvthread)
181 dnl #XE_PREPEND(-lvthread,LIBS)
183 dnl SFIO_DIR="$ac_cv_use_sfio"
184 dnl SFIO_FLAGS="-DSFIO -I$ac_cv_use_sfio/include"
185 dnl SFIO_LDFLAGS="-L$ac_cv_use_sfio/lib"
190 dnl AH_VERBATIM(FB_PIPE_NAME,
191 dnl [/* Wnet pipe name */
192 dnl #define FB_PIPE_NAME "interbas"])
193 dnl AC_DEFINE_UNQUOTED(FB_PIPE_NAME,"$FB_PIPE_NAME")
194 dnl AC_SUBST(FB_PIPE_NAME)
195 dnl dnl dnl XE_PREPEND( -mno-cygwin -mthreads -lmpr -lversion -lws2_32 -lole32,LIBS)
202 dnl AC_SUBST(SFIO_DIR)
203 dnl AC_SUBST(SFIO_FLAGS)
204 dnl AC_SUBST(SFIO_LDFLAGS)
205 dnl AC_CONFIG_HEADERS(config.h)
208 dnl echo "libc_mntent=$have_libc_mntent"