2 dnl "$Id: cups-common.m4,v 1.12 2001/11/02 17:34:54 mike Exp $"
4 dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2001 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 AC_CONFIG_HEADER(config.h)
27 dnl Default compiler flags...
29 CXXFLAGS="${CXXFLAGS:=}"
30 LDFLAGS="${LDFLAGS:=}"
32 dnl Checks for programs...
38 if test "$INSTALL" = "$ac_install_sh"; then
39 # Use full path to install-sh script...
40 INSTALL="`pwd`/install-sh -c"
44 AC_PATH_PROG(HTMLDOC,htmldoc)
46 AC_PATH_PROG(NROFF,nroff)
47 if test "$NROFF" = ""; then
48 AC_PATH_PROG(GROFF,groff)
49 if test "$GROFF" = ""; then
52 NROFF="$GROFF -T ascii"
58 dnl Architecture checks...
61 dnl Check for libraries...
62 AC_CHECK_LIB(c,crypt,LIBS="$LIBS")
63 if test "$ac_cv_lib_c_crypt" = "no"; then
64 AC_CHECK_LIB(crypt,crypt)
66 AC_CHECK_LIB(sec,getspent)
67 AC_CHECK_LIB(gen,getspent)
70 AC_CHECK_LIB(c,mallinfo,LIBS="$LIBS"; AC_DEFINE(HAVE_MALLINFO),LIBS="$LIBS")
71 if test "$ac_cv_lib_c_mallinfo" = "no"; then
72 AC_CHECK_LIB(malloc,mallinfo,
75 AC_DEFINE(HAVE_MALLINFO),
80 dnl Checks for header files.
83 AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H))
84 AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
85 AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
86 AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H))
87 AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
88 AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
89 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
91 dnl Checks for string functions.
92 AC_CHECK_FUNCS(strdup strcasecmp strncasecmp)
93 if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
94 echo Forcing snprintf emulation for HP-UX.
96 AC_CHECK_FUNCS(snprintf vsnprintf)
99 dnl Check OS version and use appropriate format string for strftime...
100 AC_MSG_CHECKING(for correct format string to use with strftime)
106 AC_DEFINE(CUPS_STRFTIME_FORMAT, NULL)
111 AC_DEFINE(CUPS_STRFTIME_FORMAT, "%c")
115 dnl Checks for mkstemp and mkstemps functions.
116 AC_CHECK_FUNCS(mkstemp mkstemps)
118 dnl Checks for vsyslog function.
119 AC_CHECK_FUNCS(vsyslog)
121 dnl Checks for signal functions.
122 if test "$uname" != "Linux"; then
123 AC_CHECK_FUNCS(sigset)
126 AC_CHECK_FUNCS(sigaction)
128 dnl Checks for wait functions.
129 AC_CHECK_FUNCS(waitpid)
130 AC_CHECK_FUNCS(wait3)
132 dnl See if the tm structure has the tm_gmtoff member...
133 AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
134 AC_TRY_COMPILE([#include <time.h>],[struct tm t;
135 int o = t.tm_gmtoff;],
137 AC_DEFINE(HAVE_TM_GMTOFF),
140 dnl Flags for "ar" command...
153 dnl End of "$Id: cups-common.m4,v 1.12 2001/11/02 17:34:54 mike Exp $".