File: configure.in

package info (click to toggle)
uudeview 0.5.20-12
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 2,504 kB
  • sloc: ansic: 12,144; sh: 2,754; makefile: 357; awk: 13
file content (115 lines) | stat: -rw-r--r-- 2,705 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which tries to guess your system
dnl	configuration so that no manual editing of the Makefile should be
dnl	necessary
dnl
dnl $Id: configure.in,v 1.25 2004/03/01 23:06:22 fp Exp $
dnl

AC_INIT(uulib.c)
AC_PREREQ(2.9)
AC_CONFIG_HEADER(config.h)

#
# package revision
#
VERSION=0.5
PATCH=20

AC_PROG_CC
AC_PROG_CPP
wi_PROTOTYPES
AC_PROG_MAKE_SET
AC_PROG_RANLIB

if test "$wi_cv_prototypes" = no ; then
	AC_WARN([Your compiler does not support function prototyping and])
	AC_WARN([is not able to properly compile this package. What a pity.])
        AC_WARN([Get gcc, or any compiler that supports function prototypes.])
	exit 1
fi

#
# Checks for header files and library functions
#

AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h)
AC_CHECK_HEADERS(io.h sys/time.h)
AC_CHECK_FUNCS(gettimeofday)

AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,_FP_tempnam))
AC_CHECK_FUNCS([mkstemp])

#
# strerror might be internally defined. this would cause a
# CHECK_FUNCS(strerror) to fail because it'd be called with
# zero arguments. So use our own code.
#
AC_MSG_CHECKING([for strerror])
AC_TRY_LINK([
char *blubb() { return (char *) strerror (42); }
],[
(void) blubb();
],have_strerror=yes,AC_DEFINE(strerror,_FP_strerror)
have_strerror=no)
AC_MSG_RESULT($have_strerror)

AC_MSG_CHECKING([for stdin])
AC_TRY_LINK([
#include <stdio.h>
char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
],[
(void) blubb();
],have_stdio=yes,AC_DEFINE(HAVE_STDIO)
have_stdio=no)
AC_MSG_RESULT($have_stdio)

if test "$ac_cv_header_stdc" = "no" ; then
	AC_CHECK_HEADERS(stdarg.h varargs.h)
	if test "$ac_cv_header_stdarg_h" = "no" ; then
	if test "$ac_cv_header_varargs_h" = "no" ; then
		AC_MSG_ERROR([neither stdarg.h nor varargs.h present])
	fi
	fi
fi

#
# Check whether this is a DOS-Based system. Another bogus test.
# Don't even bother to print a message. This code is needed so
# that autoheader includes the #undef into the final config.h
# and we can change the definition by hand on a really DOS
# system (where ./configure doesn't work anyway ...)
#

if false ; then
	AC_DEFINE(SYSTEM_DOS)
	AC_DEFINE(SYSTEM_QUICKWIN)
	AC_DEFINE(SYSTEM_WINDLL)
	AC_DEFINE(SYSTEM_OS2)
fi

#
# On some systems (so far, OS2 and WINDOWS), functions that are exported
# from a DLL must be declared specifically.
#

AC_DEFINE_UNQUOTED(UUEXPORT,)
AC_DEFINE_UNQUOTED(TOOLEXPORT,)

#
# set version number
#
AC_MSG_CHECKING([version number])
version_number="$VERSION"pl"$PATCH"
AC_MSG_RESULT($version_number)
AC_SUBST(VERSION)
AC_SUBST(PATCH)

#
# done
#

AC_OUTPUT(Makefile)