2 dnl "$Id: cups-common.m4,v 1.17 2002/05/16 13:44:53 mike Exp $"
4 dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2002 by Easy Software Products, all rights reserved.
8 dnl These coded instructions, statements, and computer programs are the
9 dnl property of Easy Software Products and are protected by Federal
10 dnl copyright law. Distribution and use rights are outlined in the file
11 dnl "LICENSE.txt" which should have been included with this file. If this
12 dnl file is missing or damaged please contact Easy Software Products
15 dnl Attn: CUPS Licensing Information
16 dnl Easy Software Products
17 dnl 44141 Airport View Drive, Suite 204
18 dnl Hollywood, Maryland 20636-3111 USA
20 dnl Voice: (301) 373-9603
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
25 dnl We need at least autoconf 2.13...
28 dnl Set the name of the config header file...
29 AC_CONFIG_HEADER(config.h)
31 dnl Default compiler flags...
33 CPPFLAGS="${CPPFLAGS:=}"
34 CXXFLAGS="${CXXFLAGS:=}"
35 LDFLAGS="${LDFLAGS:=}"
37 dnl Checks for programs...
43 if test "$INSTALL" = "$ac_install_sh"; then
44 # Use full path to install-sh script...
45 INSTALL="`pwd`/install-sh -c"
49 AC_PATH_PROG(HTMLDOC,htmldoc)
51 AC_PATH_PROG(NROFF,nroff)
52 if test "$NROFF" = ""; then
53 AC_PATH_PROG(GROFF,groff)
54 if test "$GROFF" = ""; then
57 NROFF="$GROFF -T ascii"
62 AC_PATH_PROG(STRIP,strip)
64 dnl Architecture checks...
67 dnl Check for libraries...
68 AC_SEARCH_LIBS(crypt, crypt)
69 AC_SEARCH_LIBS(getspent, sec gen)
72 AC_CHECK_LIB(c,mallinfo,LIBS="$LIBS"; AC_DEFINE(HAVE_MALLINFO),LIBS="$LIBS")
73 if test "$ac_cv_lib_c_mallinfo" = "no"; then
74 AC_CHECK_LIB(malloc,mallinfo,
77 AC_DEFINE(HAVE_MALLINFO),
82 dnl Checks for header files.
85 AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H))
86 AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
87 AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
88 AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H))
89 AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
90 AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
91 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
93 dnl Checks for string functions.
94 AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
95 if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
96 echo Forcing snprintf emulation for HP-UX.
98 AC_CHECK_FUNCS(snprintf vsnprintf)
101 dnl Check OS version and use appropriate format string for strftime...
102 AC_MSG_CHECKING(for correct format string to use with strftime)
108 AC_DEFINE(CUPS_STRFTIME_FORMAT, NULL)
113 AC_DEFINE(CUPS_STRFTIME_FORMAT, "%c")
117 dnl Checks for mkstemp and mkstemps functions.
118 AC_CHECK_FUNCS(mkstemp mkstemps)
120 dnl Checks for vsyslog function.
121 AC_CHECK_FUNCS(vsyslog)
123 dnl Checks for signal functions.
124 if test "$uname" != "Linux"; then
125 AC_CHECK_FUNCS(sigset)
128 AC_CHECK_FUNCS(sigaction)
130 dnl Checks for wait functions.
131 AC_CHECK_FUNCS(waitpid)
132 AC_CHECK_FUNCS(wait3)
134 dnl See if the tm structure has the tm_gmtoff member...
135 AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
136 AC_TRY_COMPILE([#include <time.h>],[struct tm t;
137 int o = t.tm_gmtoff;],
139 AC_DEFINE(HAVE_TM_GMTOFF),
142 dnl Flags for "ar" command...
155 dnl End of "$Id: cups-common.m4,v 1.17 2002/05/16 13:44:53 mike Exp $".