forked from UweOhse/lrzsz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
157 lines (132 loc) · 4.19 KB
/
configure.ac
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
dnl Process this file with autoconf to produce a configure script.
AC_INIT([GNU lrzsz],[0.13.0-alpha],[<[email protected]>],[lrzsz],[https://ohse.de/uwe/software/lrzsz.html])
AC_CONFIG_SRCDIR([src/crctab.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_USE_SYSTEM_EXTENSIONS
LT_INIT
dnl is in AC_PROG_CC since 2.12
AC_PREREQ([2.69])
AC_AUTOCONF_VERSION dnl just note the version of autoconf
PACKAGE_VERSION="$PACKAGE-$VERSION"
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of the package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define to the version of the package.])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION", [The concatenation of the package name, "-", and its version.])
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(PACKAGE_VERSION)
ALL_LINGUAS="de"
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
changequote(,)dnl
case $VERSION in
[0-9]*.[0-9]*.[0-9]*) README_ALPHA="README-alpha";;
*) README_ALPHA=;;
esac
changequote([, ])dnl
AC_ARG_ENABLE(mkdir,
[--disable-mkdir disable support for creating directories (lrz)],
[if test "$enableval" = "no" ; then
:
else
AC_DEFINE(ENABLE_MKDIR)
fi],
[AC_DEFINE(ENABLE_MKDIR)])
AC_ARG_ENABLE(syslog,
[AS_HELP_STRING([--disable-syslog],[disable support for syslog()])],
[
case "$enableval" in
no)
;;
yes)
AC_DEFINE(ENABLE_SYSLOG,1,[define to 1 to include syslog support.])
;;
esac
],
[AC_DEFINE([ENABLE_SYSLOG],1,[define to 1 to include syslog support.])])
if test "x$CFLAGS" = x ; then old_cflags_empty=1; fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
if test "x$GCC" = xyes ; then
if test "x$old_cflags_empty" = x1 ; then
if test "x$_CFLAGS_OWG" != x ; then
# each environment should contain at least one helpful hack :-)
CFLAGS="$_CFLAGS_OWG"
fi
fi
fi
AC_PROG_GCC_TRADITIONAL
AC_C_CONST
AC_C_INLINE
if test `hostname` = alpine.x9.ohse.de -a "$cross_compiling" = no ; then
test $prefix = NONE && prefix=/usr
if test -z "$CFLAGS" -o "x$CFLAGS" = "x-g -O2" ; then
case "$CC" in
*gcc*)
CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes"
# -Wnested_externs entfernt wegen dcgettext()
CFLAGS="$CFLAGS -Wpointer-arith -Wcast-qual -Wcast-align"
CFLAGS="$CFLAGS -Winline -Wwrite-strings -Wshadow -Wmissing-braces"
CFLAGS="$CFLAGS -Wcomments -fforce-addr -O2 -pipe"
CFLAGS="$CFLAGS -falign-loops=2 -falign-jumps=2 -falign-functions=2 -g3"
# CFLAGS="-Werror"
;;
esac
fi
fi
dnl Checks for libraries.
dnl SCO needs this.
AC_CHECK_LIB(socket,syslog,,,)
AC_CHECK_LIB(be,syslog,,,)
dnl slowlartis needs this
AC_CHECK_LIB(nsl,gethostbyname,,,)
dnl
AC_CHECK_LIB(intl,gettext,,,)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h sys/times.h)
LRZSZ_HEADERS_TERM_IO
AC_CHECK_HEADERS(sys/mman.h utime.h syslog.h sys/syslog.h sys/param.h)
AC_CHECK_HEADERS(sys/select.h strings.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_UID_T
AC_TYPE_PID_T
LRZSZ_TYPE_SPEED_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_HEADER_TIME
lrzsz_HEADER_SYS_SELECT
AC_STRUCT_TM
dnl Checks for library functions.
dnl suggested by autoscan, but not really needed.
dnl AC_FUNC_UTIME_NULL
AC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
AC_CHECK_FUNCS(gettimeofday settimeofday tcsendbreak)
AC_CHECK_FUNCS(memcpy select vprintf)
AC_CHECK_FUNCS(futimes futimens utime fchmod)
AC_CHECK_FUNCS(rdchk utime syslog siginterrupt)
AC_REPLACE_FUNCS(vasprintf)
AC_REPLACE_GNU_GETOPT
dnl for lib/error.c
AC_DEFINE(HAVE_STRERROR, 1, [we have a replacement function for this, but need to tell lib/error.c about it.])
dnl special tests
dnl
AC_CHECK_DECLS([timezone],[],[], [[#include <time.h>]])
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AM_GNU_GETTEXT(external)
AM_GNU_GETTEXT_VERSION
dnl AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME",[The name of the directory for locale stuff])
AC_CONFIG_FILES([Makefile lib/Makefile man/Makefile po/Makefile.in src/Makefile \
version.go \
src/lrzszbug])
AC_CONFIG_COMMANDS([default],[
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h],[])
AC_OUTPUT