~ubuntu-branches/ubuntu/raring/sysstat/raring

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2011-02-09 17:10:56 UTC
  • mfrom: (1.1.19 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110209171056-ep8aecyxtppsrbnf
Tags: 9.1.7-2ubuntu1
* debian/patches/cflags-ordering.patch: Re-arrange CFLAGS in 
  ./Makefile.in to resolve FTBFS. (LP: #716043)
* debian/control: Updated maintainer, as per policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Modified by Sebastien Godard (sysstat <at> orange.fr)
5
5
 
6
6
# Initialization of $PACKAGE_VERSION and $PACKAGE_NAME variables
7
 
AC_INIT(sysstat, 9.0.6.1)
 
7
AC_INIT(sysstat, 9.1.7)
8
8
 
9
9
# Ensure that a recent enough version of Autoconf is being used
10
10
AC_PREREQ(2.53)
52
52
AC_CHECK_HEADERS(libintl.h, HAVE_LIBINTL_H=1)
53
53
AC_CHECK_HEADERS(locale.h, HAVE_LOCALE_H=1)
54
54
AC_CHECK_HEADERS(net/if.h)
 
55
AC_CHECK_HEADERS(regex.h)
55
56
AC_CHECK_HEADERS(signal.h)
56
57
AC_CHECK_HEADERS(stdio.h)
57
58
AC_CHECK_HEADERS(sys/file.h)
73
74
AC_CHECK_FUNCS(strspn)
74
75
AC_CHECK_FUNCS(strstr)
75
76
 
 
77
# Should we check for lm_sensors?
 
78
AC_MSG_CHECKING(for sensors support)
 
79
AC_ARG_ENABLE(sensors,
 
80
              AC_HELP_STRING([--disable-sensors],
 
81
                             [disable sensors support]),
 
82
                             SENSORS=$enableval,SENSORS=yes)
 
83
if test $SENSORS != "yes"; then
 
84
   CFSENSORS=""
 
85
   DFSENSORS=""
 
86
else
 
87
   CFSENSORS="-lsensors"
 
88
   DFSENSORS="-DHAVE_SENSORS"
 
89
fi
 
90
AC_MSG_RESULT($SENSORS)
 
91
 
 
92
# Check for lm_sensors
 
93
HAVE_SENSORS=no
 
94
DFLAGS=""
 
95
AC_CHECK_LIB(sensors, sensors_get_detected_chips, CFLAGS="${CFLAGS} ${CFSENSORS}")
 
96
AC_MSG_CHECKING(for sensors lib)
 
97
AC_TRY_COMPILE(#include <sensors/sensors.h>
 
98
#include <sensors/error.h>
 
99
                , sensors_cleanup();,HAVE_SENSORS=yes; DFLAGS="${DFLAGS} ${DFSENSORS}", HAVE_SENSORS=no)
 
100
AC_MSG_RESULT($HAVE_SENSORS)
 
101
AC_SUBST(HAVE_SENSORS)
 
102
 
76
103
echo .
77
104
echo Check system services:
78
105
echo .
88
115
#  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
89
116
#  --disable-largefile     omit support for large files
90
117
#  --disable-nls           disable National Language Support
91
 
#  --enable-smp-race       enable workaround for SMP race
92
118
#  --enable-yesterday      tell sa2 to use "yesterday" data files
93
119
#  --disable-man-group     ignore man_group variable value
94
120
#  --enable-install-cron   tell sysstat to install cron scripts
95
121
#  --enable-clean-sa-dir   clean system activity directory
96
122
#  --enable-compress-manpg compress manual pages
97
123
#  --enable-install-isag   install isag script
 
124
#  --enable-debuginfo      enable debug output (--debuginfo option)
98
125
#  --disable-documentation do not install documentation (man pages...)
 
126
#  --disable-sensors       do not link against libsensors even if available
99
127
#
100
128
# Some influential environment variables:
101
129
#  rcdir         directory where startup scripts are installed
237
265
   echo "WARNING: msgmerge command not found!"
238
266
fi
239
267
 
240
 
# Linux SMP race workaround
241
 
AC_MSG_CHECKING(whether workaround for SMP race is needed)
242
 
AC_ARG_ENABLE(smp-race, 
243
 
              AC_HELP_STRING([--enable-smp-race],
244
 
                             [enable workaround for SMP race]),
245
 
                             SMP=$enableval,SMP=no)
246
 
if test $SMP != "yes"; then
247
 
   SMP="no"
248
 
   DFLAGS=""
249
 
else
250
 
   DFLAGS="-DSMP_RACE"
251
 
fi
252
 
if test $SMP = "no"; then
253
 
   UNAMER=`uname -r`
254
 
   VTEMP=`echo $UNAMER | sed -e 's/^[[0-9]]*[[.]]//'`
255
 
   VERSION=`echo $UNAMER | sed -e "s/[[.]]$VTEMP$//"`
256
 
   VTEMP2=`echo $VTEMP | sed -e 's/^[[0-9]]*[[.]]//'`
257
 
   PATCHLEVEL=`echo $VTEMP | sed -e "s/[[.]]$VTEMP2$//"`
258
 
   VTEMP3=`echo $VTEMP2 | sed -e 's/^[[0-9]]*[[^0-9]]//'`
259
 
   SUBLEVEL=`echo $VTEMP2 | sed -e "s/[[^0-9]]$VTEMP3$//"`
260
 
 
261
 
   if test $VERSION -eq 2 && test $PATCHLEVEL -eq 2 && test $SUBLEVEL -le 15 ; then
262
 
      UNAMEV=`uname -v`
263
 
      SMPTAG=`echo $UNAMEV | sed -e 's/SMP//'`
264
 
      if test "$UNAMEV" != "$SMPTAG" ; then
265
 
         SMP="yes"
266
 
         DFLAGS="-DSMP_RACE"
267
 
      fi
268
 
   fi
269
 
fi
270
 
AC_MSG_RESULT($SMP)
271
 
AC_SUBST(DFLAGS)
272
 
 
273
268
# Check whether sa2 should process data file of the day before
274
269
AC_MSG_CHECKING(whether sa2 should process data file of the day before)
275
270
AC_ARG_ENABLE(yesterday,
336
331
AC_ARG_ENABLE(man-group,
337
332
              AC_HELP_STRING([--disable-man-group],
338
333
                             [ignore man_group variable value]),
339
 
                             AUX_IMG=$enableval,AUX_IMG=no)
340
 
if test $AUX_IMG != "yes"; then
 
334
                             AUX_IMG=$enableval,AUX_IMG=yes)
 
335
if test $AUX_IMG != "no"; then
341
336
   IGNORE_MAN_GROUP=n
342
337
   AUX_IMG=no
343
338
else
344
339
   IGNORE_MAN_GROUP=y
 
340
   AUX_IMG=yes
345
341
fi
346
342
AC_MSG_RESULT($AUX_IMG)
347
343
AC_SUBST(IGNORE_MAN_GROUP)
407
403
AC_MSG_RESULT($AUX_CRON)
408
404
AC_SUBST(INSTALL_CRON)
409
405
 
410
 
if `grep ^adm: /etc/passwd >/dev/null 2>&1`; then
411
 
   CUSR="adm"
412
 
else
413
 
   CUSR="root"
414
 
fi
 
406
CUSR="root"
415
407
if test $INSTALL_CRON = "y"; then 
416
408
   AC_MSG_CHECKING(crontab owner)
417
409
   AC_ARG_VAR([cron_owner],[crontab owner])
484
476
AC_SUBST(INSTALL_DOC)
485
477
 
486
478
# Set directory for installing manual pages (see comment in Makefile)
487
 
if test $mandir != "\${datarootdir}/man"; then
488
 
        AuxMandir=$mandir
489
 
else
490
 
        AuxMandir=$AuxPrefix/man
491
 
fi
492
 
AC_SUBST(AuxMandir)
 
479
AC_SUBST(mandir)
 
480
 
 
481
# Check whether --debuginfo options should be allowed
 
482
AC_ARG_ENABLE(debuginfo, 
 
483
              AC_HELP_STRING([--enable-debuginfo],
 
484
                             [enable debug output (--debuginfo option)]),
 
485
                             WITH_DEBUG=yes ; DFLAGS="$DFLAGS -DDEBUG" , WITH_DEBUG=no)
 
486
AC_SUBST(WITH_DEBUG)
 
487
AC_SUBST(DFLAGS)
493
488
 
494
489
# Create files
495
490
echo .
497
492
echo .
498
493
AC_CONFIG_FILES([sa1], [chmod +x sa1])          # Permissions must be changed
499
494
AC_CONFIG_FILES([sa2], [chmod +x sa2])          # Permissions must be changed
500
 
AC_CONFIG_FILES([crontab:crontab.sample])       # File must be renamed
 
495
AC_CONFIG_FILES([cron/crontab:cron/crontab.sample])     # File must be renamed
501
496
AC_CONFIG_FILES([sysstat.sysconfig])
502
497
AC_CONFIG_FILES([version.h:version.in])         # File must be renamed
503
498
AC_CONFIG_FILES([sysconfig.h:sysconfig.in])     # File must be renamed
504
 
AC_CONFIG_FILES([sysstat.cron.daily])
505
 
AC_CONFIG_FILES([sysstat.cron.hourly])
506
 
AC_CONFIG_FILES([sysstat.crond])
507
 
AC_CONFIG_FILES([sysstat.crond.sample.in:sysstat.crond.in], [sed s/^/#/ sysstat.crond.sample.in > sysstat.crond.sample])
 
499
AC_CONFIG_FILES([cron/sysstat.cron.daily])
 
500
AC_CONFIG_FILES([cron/sysstat.cron.hourly])
 
501
AC_CONFIG_FILES([cron/sysstat.crond])
 
502
AC_CONFIG_FILES([cron/sysstat.crond.sample.in:cron/sysstat.crond.in], [sed s/^/#/ cron/sysstat.crond.sample.in > cron/sysstat.crond.sample])
508
503
AC_CONFIG_FILES([sysstat], [chmod +x sysstat])  # Permissions must be changed
509
504
AC_CONFIG_FILES([man/sa1.8:man/sa1.in])         # File must be renamed
510
505
AC_CONFIG_FILES([man/sa2.8:man/sa2.in])         # File must be renamed
511
506
AC_CONFIG_FILES([man/sadc.8:man/sadc.in])       # File must be renamed
512
507
AC_CONFIG_FILES([man/sadf.1:man/sadf.in])       # File must be renamed
513
508
AC_CONFIG_FILES([man/sar.1:man/sar.in])         # File must be renamed
 
509
AC_CONFIG_FILES([man/sysstat.5:man/sysstat.in]) # File must be renamed
 
510
AC_CONFIG_FILES([man/iostat.1:man/iostat.in])   # File must be renamed
514
511
AC_CONFIG_FILES([contrib/isag/isag], [chmod +x contrib/isag/isag]) # Permissions must be changed
515
512
 
516
513
AC_OUTPUT(Makefile)
521
518
   rc directory:                ${RC_DIR}
522
519
   Init directory:              ${INIT_DIR}
523
520
   Configuration directory:     ${SYSCONFIG_DIR}
524
 
   Man pages directory:         $AuxMandir
 
521
   Man pages directory:         $mandir
525
522
   Compiler:                    $CC
526
523
   Compiler flags:              $CFLAGS
527
524
"