Allow RTC support to be excluded at compile time.
Add a new option to configure script, allowing to disable (and exclude) RTC module. It saves same memory.
This commit is contained in:
parent
8a94298b7e
commit
93f6664378
2 changed files with 12 additions and 3 deletions
11
configure
vendored
11
configure
vendored
|
@ -133,6 +133,7 @@ For better control, use the options below.
|
||||||
--readline-inc-dir=DIR Specify where readline include directory is
|
--readline-inc-dir=DIR Specify where readline include directory is
|
||||||
--readline-lib-dir=DIR Specify where readline lib directory is
|
--readline-lib-dir=DIR Specify where readline lib directory is
|
||||||
--with-ncurses-library=DIR Specify where ncurses lib directory is
|
--with-ncurses-library=DIR Specify where ncurses lib directory is
|
||||||
|
--disable-rtc Don't include RTC even on Linux
|
||||||
|
|
||||||
Fine tuning of the installation directories:
|
Fine tuning of the installation directories:
|
||||||
--infodir=DIR info documentation [PREFIX/info]
|
--infodir=DIR info documentation [PREFIX/info]
|
||||||
|
@ -172,6 +173,7 @@ SYSDEFS=""
|
||||||
|
|
||||||
# Support for readline (on by default)
|
# Support for readline (on by default)
|
||||||
feat_readline=1
|
feat_readline=1
|
||||||
|
feat_rtc=1
|
||||||
readline_lib=""
|
readline_lib=""
|
||||||
readline_inc=""
|
readline_inc=""
|
||||||
ncurses_lib=""
|
ncurses_lib=""
|
||||||
|
@ -206,6 +208,9 @@ do
|
||||||
--mandir=* )
|
--mandir=* )
|
||||||
SETMANDIR=`echo $option | sed -e 's/^.*=//;'`
|
SETMANDIR=`echo $option | sed -e 's/^.*=//;'`
|
||||||
;;
|
;;
|
||||||
|
--disable-rtc)
|
||||||
|
feat_rtc=0
|
||||||
|
;;
|
||||||
--help | -h )
|
--help | -h )
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -238,7 +243,11 @@ case $SYSTEM in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
Linux* )
|
Linux* )
|
||||||
EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o rtc_linux.o"
|
EXTRA_OBJECTS="sys_linux.o wrap_adjtimex.o"
|
||||||
|
if [ $feat_rtc -eq 1 ] ; then
|
||||||
|
EXTRA_OBJECTS+=" rtc_linux.o"
|
||||||
|
EXTRA_DEFS+=" -DFEAT_RTC=1"
|
||||||
|
fi
|
||||||
SYSDEFS="-DLINUX"
|
SYSDEFS="-DLINUX"
|
||||||
echo "Configuring for " $SYSTEM
|
echo "Configuring for " $SYSTEM
|
||||||
if [ "${MACHINE}" = "alpha" ]; then
|
if [ "${MACHINE}" = "alpha" ]; then
|
||||||
|
|
4
rtc.c
4
rtc.c
|
@ -33,7 +33,7 @@
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
#if defined LINUX
|
#if defined LINUX && defined FEAT_RTC
|
||||||
#include "rtc_linux.h"
|
#include "rtc_linux.h"
|
||||||
#endif /* defined LINUX */
|
#endif /* defined LINUX */
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ static struct {
|
||||||
void (*cycle_logfile)(void);
|
void (*cycle_logfile)(void);
|
||||||
} driver =
|
} driver =
|
||||||
{
|
{
|
||||||
#if defined LINUX
|
#if defined LINUX && defined FEAT_RTC
|
||||||
RTC_Linux_Initialise,
|
RTC_Linux_Initialise,
|
||||||
RTC_Linux_Finalise,
|
RTC_Linux_Finalise,
|
||||||
RTC_Linux_TimePreInit,
|
RTC_Linux_TimePreInit,
|
||||||
|
|
Loading…
Reference in a new issue