source: vendor/cpio/2.7/configure.ac@ 3365

Last change on this file since 3365 was 3332, checked in by bird, 18 years ago

cpio 2.7

File size: 3.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl This file is part of GNU cpio
3dnl Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
4dnl
5dnl This program is free software; you can redistribute it and/or modify
6dnl it under the terms of the GNU General Public License as published by
7dnl the Free Software Foundation; either version 2, or (at your option)
8dnl any later version.
9dnl
10dnl This program is distributed in the hope that it will be useful,
11dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13dnl GNU General Public License for more details.
14dnl
15dnl You should have received a copy of the GNU General Public License
16dnl along with this program; if not, write to the Free Software Foundation,
17dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19AC_INIT([GNU cpio], [2.7], [bug-cpio@gnu.org], [cpio])
20AC_CONFIG_SRCDIR(src/cpio.h)
21AC_CONFIG_AUX_DIR([build-aux])
22AM_INIT_AUTOMAKE
23AC_CONFIG_HEADERS([config.h])
24
25AC_PREREQ([2.59])
26
27dnl Check for programs
28gl_USE_SYSTEM_EXTENSIONS
29AC_PROG_CC
30AC_PROG_CPP
31AC_PROG_GCC_TRADITIONAL
32AC_PROG_INSTALL
33AC_PROG_RANLIB
34AC_C_PROTOTYPES
35
36AC_SYS_LARGEFILE
37
38AC_TYPE_SIGNAL
39AC_HEADER_MAJOR
40AC_C_CONST
41AC_TYPE_UID_T
42AC_CHECK_TYPE(gid_t, int)
43AC_HEADER_STDC
44AC_HEADER_DIRENT
45
46cpio_GNULIB
47cpio_PAXUTILS
48
49AC_SUBST(CPIO_MT_PROG)
50
51AC_ARG_ENABLE(mt,
52 AC_HELP_STRING([--enable-mt], [Enable building of mt program]),
53 [case $enableval in
54 yes) CPIO_MT_PROG='mt$(EXEEXT)';;
55 no) ;;
56 esac])
57
58AC_CHECK_HEADERS(unistd.h stdlib.h string.h fcntl.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h)
59AC_REPLACE_FUNCS(bcopy mkdir strdup strerror)
60
61AC_MSG_CHECKING(for sys_errlist and sys_nerr)
62AC_TRY_RUN(
63extern char *sys_errlist[[]];
64extern int sys_nerr;
65main() { char *s = sys_errlist[[0]]; return 0; },
66 AC_DEFINE(HAVE_SYS_ERRLIST,1,
67 [Define if your system has sys_errlist global variable])
68 AC_MSG_RESULT(yes),
69 AC_MSG_RESULT(no),
70 AC_MSG_RESULT(don't know))
71
72AC_CHECK_DECLS([errno, sys_nerr, sys_errlist, getpwnam, getgrnam, getgrgid, strdup, strerror, getenv, atoi, exit], , , [
73#include <stdio.h>
74#include <stdlib.h>
75#include <errno.h>
76#ifdef HAVE_STRING_H
77# include <string.h>
78#else
79# include <strings.h>
80#endif
81#include <pwd.h>
82#include <grp.h>])
83
84dnl Checks for fnmatch
85have_fnmatch=no
86AC_MSG_CHECKING(for working fnmatch)
87dnl Some versions of Solaris have a fnmatch() function, but it doesn't work!
88dnl So we run a test program. If we're cross-compiling, do it the old way.
89AC_TRY_RUN([
90main() {
91if (fnmatch ("a*", "abc", 0) == 0) return 0;
92else return 1; }],
93have_fnmatch=yes, have_fnmatch=no, have_fnmatch=no)
94if test $have_fnmatch = yes ; then
95 AC_MSG_RESULT(yes)
96else
97 AC_MSG_RESULT(no)
98 AC_LIBOBJ(fnmatch)
99 AC_CONFIG_LINKS(src/fnmatch.h:headers/fnmatch.h)
100fi
101
102AC_CHECK_FUNCS(lchown endpwent endgrent)
103AC_FUNC_VPRINTF
104AC_FUNC_ALLOCA
105
106# Gettext.
107AM_GNU_GETTEXT([external], [need-formatstring-macros])
108AM_GNU_GETTEXT_VERSION(0.15)
109
110# Initialize the test suite.
111AC_CONFIG_TESTDIR(tests)
112AC_CONFIG_FILES([tests/Makefile tests/atlocal]) # FIXME: tests/preset?
113AM_MISSING_PROG([AUTOM4TE], [autom4te])
114
115AC_CONFIG_FILES([Makefile
116 doc/Makefile
117 headers/Makefile
118 lib/Makefile
119 rmt/Makefile
120 src/Makefile
121 po/Makefile.in])
122AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.