~ubuntu-branches/ubuntu/natty/sarg/natty

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-01-11 15:07:10 UTC
  • mfrom: (1.1.8 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100111150710-mgvjhyjs13mrg0tb
Tags: 2.2.6-1
* New upstream release
  - Fixes issues in getword loop detection (Closes: #522284)
  - Removed patches integrated upstream
  - Fixes usertab parsing for IPv6 address (Closes: #504749)
  - Fixes typo in dansguardian_log.c (Closes: #540438)
  - Fixes error parsing squidGuard logs (Closes: #486895)

* debian/sarg-reports.conf
  - Fixed typo (Closes: #517356)

* debian/control
  - Added Build-Dep options on libgd2-xpm-dev (Closes: #540121)
  - Added Dependency on ${misc:Depends}
  - Added dependency on dpatch
  - Bumped Standard-Version to 3.8.3

* debian/compat
  - Upgraded debhelper compatibility to level 6

* debian/rules
  - Removed unnecessary upgrade of autoconf files
  - Added dpatch rules
  - Fixed configuration options and paths

* debian/patches/01_makefile-install-path
  - Fixed build-time installation paths

* debian/patches/02_config-file-references
  - Fixed references to configuration files

* debian/squid.conf
  - Sinced with upstream changes

* debian/{postrm,preinst,sarg.conf,sarg-reports,rules,dirs,sarg-reports.conf}
  - Moved configuration files to /etc/sarg and data directory to /var/lib/sarg
    (Closes: #553554, #502273)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Process this file with autoconf to produce a configure script.
2
 
AC_INIT(log.c)
 
2
AC_INIT([sarg],[2.2.6])
 
3
AC_CONFIG_SRCDIR([log.c])
3
4
AC_CONFIG_AUX_DIR(cfgaux)
4
5
 
5
 
LDFLAGS="-g"
6
 
 
7
6
AC_CANONICAL_HOST
8
7
 
9
8
AC_ARG_WITH(gcc,
19
18
esac
20
19
 
21
20
if test "${CC}" = "cc" ; then
22
 
   CFLAGS="${CFLAGS} -w -g -O2 -Aa"
23
 
else
24
 
   CFLAGS="${CFLAGS} -w"
 
21
   CFLAGS="${CFLAGS} -g -O2 -Aa"
25
22
fi
 
23
CFLAGS="${CFLAGS} -Wall -Wextra -Werror=implicit-function-declaration -Werror=format"
 
24
 
26
25
 
27
26
case "$host" in
28
27
   *-solaris*)
47
46
AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h sys/time.h time.h unistd.h sys/dirent.h \
48
47
                 dirent.h sys/socket.h netdb.h arpa/inet.h sys/types.h netinet/in.h sys/stat.h \
49
48
                 ctype.h gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h iconv.h \
50
 
                 errno.h sys/resource.h)
 
49
                 errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h limits.h)
51
50
 
52
51
AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD="yes", HAVE_GD="")
53
52
 
55
54
AC_C_CONST
56
55
AC_STRUCT_TM
57
56
 
58
 
dnl check for the off_t size
59
 
AC_CHECK_SIZEOF(off_t)
60
 
if test $ac_cv_sizeof_off_t = "4"; then
61
 
    AC_DEFINE(OFFSET_STRING, "%d", [Offset string])
62
 
elif test $ac_cv_sizeof_off_t = "8"; then
63
 
    AC_DEFINE(OFFSET_STRING, "%lli", [Offset string])
64
 
else
65
 
    AC_ERROR(can not detect the size of your system\'s off_t type)
66
 
fi
 
57
AC_SYS_LARGEFILE
67
58
 
68
59
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
69
60
# needs to be defined for it
70
61
AC_MSG_CHECKING([for fopen64])
71
62
AC_CACHE_VAL(bu_cv_have_fopen64,
72
 
[AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
73
 
bu_cv_have_fopen64=yes,
74
 
[saved_CPPFLAGS=$CPPFLAGS
75
 
 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
 
63
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *f = fopen64 ("/tmp/foo","r");]])],[bu_cv_have_fopen64=yes],[saved_CFLAGS=$CFLAGS
 
64
 CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
76
65
 AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
77
66
bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE",
78
67
bu_cv_have_fopen64=no)
79
 
 CPPFLAGS=$saved_CPPFLAGS])])
 
68
 CFLAGS=$saved_CFLAGS])])
80
69
AC_MSG_RESULT($bu_cv_have_fopen64)
81
70
if test "$bu_cv_have_fopen64" != no; then
82
71
  AC_DEFINE([HAVE_FOPEN64], 1,
88
77
fi
89
78
 
90
79
 
91
 
dnl Select bindir
92
 
AC_ARG_ENABLE(bindir,
93
 
[  --enable-bindir=bindir
94
 
                        Select bindir ],
95
 
[
96
 
    if test "$enableval"; then
97
 
        BINDIR=$enableval
98
 
    fi
99
 
],[BINDIR="/usr/bin"])
100
 
echo "using $BINDIR as the SARG binary"
101
 
AC_SUBST(BINDIR)
102
 
 
103
 
dnl Select mandir
104
 
AC_ARG_ENABLE(mandir,
105
 
[  --enable-mandir=mandir
106
 
                        Select mandir ],
107
 
[
108
 
    if test "$enableval"; then
109
 
        MANDIR=$enableval
110
 
    fi
111
 
],[MANDIR="/usr/local/man/man1"])
112
 
echo "using $MANDIR as the SARG man page"
113
 
AC_SUBST(MANDIR)
114
 
 
115
 
dnl Select sysconfdir
116
 
AC_ARG_ENABLE(sysconfdir,
117
 
[  --enable-sysconfdir=sysconfdir
118
 
                        Select sysconfdir ],
119
 
[
120
 
    if test "$enableval"; then
121
 
        SYSCONFDIR=$enableval
122
 
    fi
123
 
],[SYSCONFDIR="/usr/local/sarg"])
124
 
echo "using $SYSCONFDIR as the SARG configuration dir"
125
 
AC_SUBST(SYSCONFDIR)
 
80
dnl check for the off_t size
 
81
AC_CHECK_SIZEOF(off_t)
 
82
if test $ac_cv_sizeof_off_t = "4"; then
 
83
    AC_DEFINE(OFFSET_STRING, "%d", [Offset string])
 
84
elif test $ac_cv_sizeof_off_t = "8"; then
 
85
    AC_DEFINE(OFFSET_STRING, "%"PRId64, [Offset string])
 
86
else
 
87
    AC_MSG_ERROR([can not detect the size of your system\'s off_t type])
 
88
fi
 
89
 
 
90
dnl check for the rlim_t size
 
91
AC_CHECK_SIZEOF(rlim_t,1,[#if HAVE_SYS_RESOURCE_H
 
92
#include <sys/resource.h>
 
93
#endif
 
94
])
 
95
if test $ac_cv_sizeof_rlim_t = "4"; then
 
96
    AC_DEFINE(RLIM_STRING, "%d", [Rlim string])
 
97
elif test $ac_cv_sizeof_rlim_t = "8"; then
 
98
    AC_DEFINE(RLIM_STRING, "%lli", [Rlim string])
 
99
else
 
100
    AC_MSG_ERROR([can not detect the size of your system\'s rlim_t type])
 
101
fi
126
102
 
127
103
dnl Select htmldir
128
104
AC_ARG_ENABLE(htmldir,
129
105
[  --enable-htmldir=htmldir
130
 
                        Select htmldir ],
 
106
                        Select htmldir as the root of your WWW documents ],
131
107
[
132
108
    if test "$enableval"; then
133
109
        HTMLDIR=$enableval
136
112
echo "using $HTMLDIR as the WWW Document Root dir"
137
113
AC_SUBST(HTMLDIR)
138
114
 
139
 
 
140
 
AC_OUTPUT(Makefile)
 
115
dnl Select languages dir
 
116
AC_ARG_ENABLE(languagedir,
 
117
[  --enable-languagedir=languagedir
 
118
                        Select languagedir as the directory with the translations of sarg ],
 
119
[
 
120
    if test "$enableval"; then
 
121
        LANGDIR=$enableval
 
122
    fi
 
123
],[LANGDIR="${datarootdir}/sarg/languages"])
 
124
echo "using $LANGDIR as the directory of the translations"
 
125
AC_SUBST(LANGDIR)
 
126
 
 
127
dnl Select fonts dir
 
128
AC_ARG_ENABLE(fontdir,
 
129
[  --enable-fontdir=fontdir
 
130
                        Select fontdir as the directory with the fonts to use in the reports ],
 
131
[
 
132
    if test "$enableval"; then
 
133
        FONTDIR=$enableval
 
134
    fi
 
135
],[FONTDIR="${datarootdir}/sarg/fonts"])
 
136
echo "using $FONTDIR as the directory of the fonts"
 
137
AC_SUBST(FONTDIR)
 
138
 
 
139
dnl Select images dir
 
140
AC_ARG_ENABLE(imagedir,
 
141
[  --enable-imagedir=imagedir
 
142
                        Select imagedir as the directory with the images to use in the reports ],
 
143
[
 
144
    if test "$enableval"; then
 
145
        IMAGEDIR=$enableval
 
146
    fi
 
147
],[IMAGEDIR="${datarootdir}/sarg/images"])
 
148
echo "using $IMAGEDIR as the directory of the images"
 
149
AC_SUBST(IMAGEDIR)
 
150
 
 
151
dnl Enable extra compile and run time protection
 
152
AC_ARG_ENABLE(extraprotection,
 
153
[  --enable-extraprotection
 
154
                        Enable compile and runtime extra protections ],
 
155
[
 
156
    if test "$enableval"; then
 
157
       CFLAGS="${CFLAGS} -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=2 -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter"
 
158
    fi
 
159
],[IMAGEDIR="${datarootdir}/sarg/images"])
 
160
echo "using $IMAGEDIR as the directory of the images"
 
161
AC_SUBST(IMAGEDIR)
 
162
 
 
163
AC_CONFIG_FILES([Makefile])
 
164
AC_OUTPUT