summaryrefslogtreecommitdiff
path: root/sntp/m4/ntp_locinfo.m4
blob: 6701ba028b60fb90cd069ced6cd3d2a639ef9fb3 (plain)
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
dnl ######################################################################
dnl @synopsis NTP_LOCINFO([SCRIPTSDIRPATH])
dnl Location information:
dnl - installation directory (*_DB for bin/, *_DL for libexec/, *_DS for sbin/)
dnl   ... or *_NI for noinst_*
dnl - man tag format (man or mdoc)
dnl - man section (1, 1m, 1M, 8)

AC_DEFUN([NTP_LOCINFO], [

AC_MSG_CHECKING([for install dir and man conventions])

AC_ARG_WITH(
    [locfile],
    [AS_HELP_STRING(
	[--with-locfile=XXX],
	[os-specific or "legacy"]
    )],
    [],
    [with_locfile=no]
)

(									\
    SENTINEL_DIR="$PWD" &&						\
    cd $srcdir/$1 &&							\
    case "$with_locfile" in						\
     yes|no|'')								\
	scripts/genLocInfo -d "$SENTINEL_DIR"				\
	;;								\
     *)									\
	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
	;;								\
    esac								\
) > genLocInfo.i 2> genLocInfo.err
. ./genLocInfo.i

case "$GENLOCINFO" in
 OK)
    AC_MSG_RESULT([in file $GENLOCINFOFILE])
    rm genLocInfo.err genLocInfo.i
    ;;
 *)
    AC_MSG_RESULT([failed.])
    AC_MSG_ERROR([Problem with genLocInfo!])
    ;;
esac

AM_CONDITIONAL([WANT_CALC_TICKADJ_MS], [test "$CALC_TICKADJ_MS" ])

AC_SUBST([CALC_TICKADJ_DB])
AC_SUBST([CALC_TICKADJ_DL])
AC_SUBST([CALC_TICKADJ_DS])
AC_SUBST([CALC_TICKADJ_MS])
AC_SUBST([CALC_TICKADJ_NI])
AC_SUBST([MANTAGFMT])
AC_SUBST([NTPDATE_DB])
AC_SUBST([NTPDATE_DL])
AC_SUBST([NTPDATE_DS])
AC_SUBST([NTPDATE_MS])
AC_SUBST([NTPDATE_NI])
AC_SUBST([NTPDC_DB])
AC_SUBST([NTPDC_DL])
AC_SUBST([NTPDC_DS])
AC_SUBST([NTPDC_MS])
AC_SUBST([NTPDC_NI])
AC_SUBST([NTPDSIM_DB])
AC_SUBST([NTPDSIM_DL])
AC_SUBST([NTPDSIM_DS])
AC_SUBST([NTPDSIM_MS])
AC_SUBST([NTPDSIM_NI])
AC_SUBST([NTPD_DB])
AC_SUBST([NTPD_DL])
AC_SUBST([NTPD_DS])
AC_SUBST([NTPD_MS])
AC_SUBST([NTPD_NI])
AC_SUBST([NTPQ_DB])
AC_SUBST([NTPQ_DL])
AC_SUBST([NTPQ_DS])
AC_SUBST([NTPQ_MS])
AC_SUBST([NTPQ_NI])
AC_SUBST([NTPSNMPD_DB])
AC_SUBST([NTPSNMPD_DL])
AC_SUBST([NTPSNMPD_DS])
AC_SUBST([NTPSNMPD_MS])
AC_SUBST([NTPSNMPD_NI])
AC_SUBST([NTPSWEEP_DB])
AC_SUBST([NTPSWEEP_DL])
AC_SUBST([NTPSWEEP_DS])
AC_SUBST([NTPSWEEP_MS])
AC_SUBST([NTPSWEEP_NI])
AM_CONDITIONAL([INSTALL_NTPSWEEP], [test -z "$NTPSWEEP_NI" ])
AC_SUBST([NTPTIME_DB])
AC_SUBST([NTPTIME_DL])
AC_SUBST([NTPTIME_DS])
AC_SUBST([NTPTIME_MS])
AC_SUBST([NTPTIME_NI])
AC_SUBST([NTPTRACE_DB])
AC_SUBST([NTPTRACE_DL])
AC_SUBST([NTPTRACE_DS])
AC_SUBST([NTPTRACE_MS])
AC_SUBST([NTPTRACE_NI])
AC_SUBST([NTP_KEYGEN_DB])
AC_SUBST([NTP_KEYGEN_DL])
AC_SUBST([NTP_KEYGEN_DS])
AC_SUBST([NTP_KEYGEN_MS])
AC_SUBST([NTP_KEYGEN_NI])
AC_SUBST([NTP_WAIT_DB])
AC_SUBST([NTP_WAIT_DL])
AC_SUBST([NTP_WAIT_DS])
AC_SUBST([NTP_WAIT_MS])
AC_SUBST([NTP_WAIT_NI])
AC_SUBST([SNTP_DB])
AC_SUBST([SNTP_DL])
AC_SUBST([SNTP_DS])
AC_SUBST([SNTP_MS])
AC_SUBST([SNTP_NI])
AC_SUBST([TICKADJ_DB])
AC_SUBST([TICKADJ_DL])
AC_SUBST([TICKADJ_DS])
AC_SUBST([TICKADJ_MS])
AC_SUBST([TICKADJ_NI])
AC_SUBST([TIMETRIM_DB])
AC_SUBST([TIMETRIM_DL])
AC_SUBST([TIMETRIM_DS])
AC_SUBST([TIMETRIM_MS])
AC_SUBST([TIMETRIM_NI])
AC_SUBST([UPDATE_LEAP_DB])
AC_SUBST([UPDATE_LEAP_DL])
AC_SUBST([UPDATE_LEAP_DS])
AC_SUBST([UPDATE_LEAP_MS])
AC_SUBST([UPDATE_LEAP_NI])
AM_CONDITIONAL([INSTALL_UPDATE_LEAP], [test -z "$UPDATE_LEAP_NI" ])

])dnl
dnl ======================================================================