Annotation of pkgsrc/pkgtools/pkg_install/files/configure.ac, Revision 1.26.2.4
1.1 jlam 1: dnl Process this file with autoconf to produce a configure script.
2: AC_PREREQ(2.52)
1.26.2.3 joerg 3: AC_INIT([pkg_install], [20080524], [joerg@NetBSD.org])
1.1 jlam 4: AC_CONFIG_SRCDIR([lib/plist.c])
5: AC_CONFIG_HEADER(lib/config.h)
6:
7: AC_CANONICAL_HOST
8: CANONICAL_HOST=$host
9: AC_SUBST(CANONICAL_HOST)
10: AC_SUBST(INCLUDES)
11:
12: # Checks for programs.
13: AC_PROG_MAKE_SET
14: AC_PROG_CC
15: AC_PROG_INSTALL
16: AC_PROG_LN_S
17: AC_PROG_RANLIB
18: AC_CHECK_PROG(AR, ar, ar)
19:
1.3 jlam 20: AC_PATH_PROG(CHMOD, chmod)
21: AC_PATH_PROG(CMP, cmp)
22: AC_PATH_PROG(CP, cp)
23: AC_PATH_PROG(ENV, env)
24: AC_PATH_PROG(FIND, find)
25: AC_PATH_PROG(GREP, grep)
26: AC_PATH_PROG(LN, ln)
27: AC_PATH_PROG(MKDIR, mkdir)
28: AC_PATH_PROG(RMDIR, rmdir)
29: AC_PATH_PROG(RM, rm)
30: AC_PATH_PROG(SED, sed)
31: AC_PATH_PROG(SORT, sort)
32: AC_PATH_PROG(TOUCH, touch)
33:
1.1 jlam 34: AUTOCONF=${AUTOCONF-"$srcdir/missing --run autoconf"}
35: AC_SUBST(AUTOCONF)
36: AUTOHEADER=${AUTOHEADER-"$srcdir/missing --run autoheader"}
37: AC_SUBST(AUTOHEADER)
38:
39: dnl Set the default pkg dbdir
40: AC_ARG_WITH(pkgdbdir,
1.4 grant 41: [ --with-pkgdbdir=DIR Where to put the pkg database (/var/db/pkg)],
1.1 jlam 42: [ pkgdbdir="$with_pkgdbdir" ],
43: [ pkgdbdir="/var/db/pkg" ])
44: AC_SUBST(pkgdbdir)
1.4 grant 45:
1.26.2.1 joerg 46: AC_ARG_WITH(ssl,
47: [ --with-ssl Enable OpenSSL based signature support],
48: [ ssl_support=yes ],
49: [ ssl_support= ])
50: AC_SUBST(ssl_support)
51:
1.22 joerg 52: AC_ARG_ENABLE([bootstrap],
53: [AS_HELP_STRING([--enable-bootstrap], [build minimal version of pkg_install])],
54: [bootstrap=yes], [bootstrap=])
55:
56: AC_SUBST(bootstrap)
57:
1.1 jlam 58: dnl Checks for libraries.
1.16 christos 59: AC_CHECK_LIB(db, __db185_open, , AC_SEARCH_LIBS(dbopen, [db db1]))
1.1 jlam 60: AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses])
61:
62: dnl Checks for header files.
63: AC_HEADER_STDC
1.23 joerg 64: AC_CHECK_HEADERS([assert.h ctype.h dirent.h err.h errno.h fnctl.h \
1.26.2.2 joerg 65: fnmatch.h glob.h grp.h inttypes.h limits.h netdb.h \
1.23 joerg 66: pwd.h regex.h signal.h stdarg.h stdio.h stdlib.h string.h \
67: termcap.h termios.h time.h unistd.h vis.h])
1.16 christos 68: AC_CHECK_HEADERS([db1/db.h db_185.h db.h])
1.25 joerg 69: AC_CHECK_HEADERS([sys/cdefs.h sys/file.h sys/ioctl.h sys/param.h \
1.12 jlam 70: sys/poll.h sys/queue.h sys/resource.h sys/signal.h sys/stat.h \
71: sys/statvfs.h sys/time.h sys/types.h sys/utsname.h sys/vfs.h \
72: sys/wait.h])
1.1 jlam 73:
74: # Checks for library functions.
1.16 christos 75: AC_CHECK_FUNCS([chflags dbopen __db185_open tgetent vfork])
1.2 jlam 76:
1.26 joerg 77: AC_SEARCH_LIBS([gethostbyname], [nsl])
78: AC_SEARCH_LIBS([socket],
79: [socket],
80: [],
81: [AC_CHECK_LIB([socket],
82: [socket],
83: [LIBS="-lsocket -lnsl $LIBS"],
84: [],
85: [-lnsl])])
86:
1.20 adrianp 87: dnl Check for types
88: AC_TYPE_UINT8_T
89: AC_TYPE_UINT16_T
90: AC_TYPE_UINT32_T
91: AC_TYPE_UINT64_T
92:
1.15 dmcmahil 93: need_priu64=no
94: AC_MSG_CHECKING([for a working PRIu64])
95: AC_LANG_PUSH([C])
96: AC_RUN_IFELSE(
97: [AC_LANG_PROGRAM([[
98: #include <stdio.h>
99: #ifdef HAVE_INTTYPES_H
100: #include <inttypes.h>
101: #endif
102: ]],
103: [[
104: char *x;
105: #if !defined(PRIu64)
106: return -1;
107: #else
108: x = PRIu64;
109: if( x[0] == '%' ) {
110: return -1;
111: } else {
112: return 0;
113: }
114: #endif
115: ]])],
116: [
117: # program worked correctly
118: AC_MSG_RESULT([yes])
119: ],
120: [
121: # program failed
122: AC_MSG_RESULT([no])
123: AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
124: need_priu64=yes
125: ],
126: [
127: # we are cross compiling
128: AC_MSG_RESULT([unable to check when crosscompiling])
129: AC_DEFINE([NEED_PRI_MACRO], [1], [Defined when PRIu64 is missing or broken])
130: need_priu64=yes
131: ])
132: AC_LANG_POP([C])
133: AC_CHECK_SIZEOF(int)
134: AC_CHECK_SIZEOF(long)
135: AC_CHECK_SIZEOF(long long)
136:
1.17 joerg 137: case $host in
1.24 joerg 138: *-*-dragonfly* |*-*-freebsd*)
1.17 joerg 139: AC_DEFINE([NUMERIC_VERSION_ONLY], [1], [Defined when to retain only the numeric OS version])
140: ;;
141: esac
142:
1.2 jlam 143: AH_BOTTOM(
144: #if !HAVE_VFORK
145: # define vfork fork
146: #endif
147: )
1.1 jlam 148:
1.19 adrianp 149: AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile
150: audit-packages/Makefile audit-packages/audit-packages.1 \
151: audit-packages/audit-packages.cat1 audit-packages/audit-packages.conf \
152: audit-packages/audit-packages.conf.5 \
153: audit-packages/audit-packages.conf.cat5 \
154: audit-packages/download-vulnerability-list.1 \
155: audit-packages/download-vulnerability-list.cat1 \
156: audit-packages/download-vulnerability-list.sh bpm/bpm.sh \
1.9 jlam 157: create/Makefile delete/Makefile info/Makefile lib/Makefile \
158: view/Makefile view/linkfarm.sh view/pkg_view.sh])
1.1 jlam 159: AC_OUTPUT
CVSweb <webmaster@jp.NetBSD.org>