xref: /freebsd/contrib/ntp/sntp/m4/ntp_locinfo.m4 (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
1dnl ######################################################################
2dnl @synopsis NTP_LOCINFO([SCRIPTSDIRPATH])
3dnl Location information:
4dnl - installation directory (*_DB for bin/, *_DL for libexec/, *_DS for sbin/)
5dnl   ... or *_NI for noinst_*
6dnl - man tag format (man or mdoc)
7dnl - man section (1, 1m, 1M, 8)
8
9AC_DEFUN([NTP_LOCINFO], [
10
11AC_MSG_CHECKING([for install dir and man conventions])
12
13AC_ARG_WITH(
14    [locfile],
15    [AS_HELP_STRING(
16	[--with-locfile=XXX],
17	[os-specific or "legacy"]
18    )],
19    [],
20    [with_locfile=no]
21)
22
23(									\
24    SENTINEL_DIR="$PWD" &&						\
25    cd $srcdir/$1 &&							\
26    case "$with_locfile" in						\
27     yes|no|'')								\
28	scripts/genLocInfo -d "$SENTINEL_DIR"				\
29	;;								\
30     *)									\
31	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
32	;;								\
33    esac								\
34) > genLocInfo.i 2> genLocInfo.err
35. ./genLocInfo.i
36
37case "$GENLOCINFO" in
38 OK)
39    AC_MSG_RESULT([in file $GENLOCINFOFILE])
40    rm genLocInfo.err genLocInfo.i
41    ;;
42 *)
43    AC_MSG_RESULT([failed.])
44    AC_MSG_ERROR([Problem with genLocInfo!])
45    ;;
46esac
47
48AM_CONDITIONAL([WANT_CALC_TICKADJ_MS], [test "$CALC_TICKADJ_MS" ])
49
50AC_SUBST([CALC_TICKADJ_DB])
51AC_SUBST([CALC_TICKADJ_DL])
52AC_SUBST([CALC_TICKADJ_DS])
53AC_SUBST([CALC_TICKADJ_MS])
54AC_SUBST([CALC_TICKADJ_NI])
55AC_SUBST([MANTAGFMT])
56AC_SUBST([NTPDATE_DB])
57AC_SUBST([NTPDATE_DL])
58AC_SUBST([NTPDATE_DS])
59AC_SUBST([NTPDATE_MS])
60AC_SUBST([NTPDATE_NI])
61AC_SUBST([NTPDC_DB])
62AC_SUBST([NTPDC_DL])
63AC_SUBST([NTPDC_DS])
64AC_SUBST([NTPDC_MS])
65AC_SUBST([NTPDC_NI])
66AC_SUBST([NTPDSIM_DB])
67AC_SUBST([NTPDSIM_DL])
68AC_SUBST([NTPDSIM_DS])
69AC_SUBST([NTPDSIM_MS])
70AC_SUBST([NTPDSIM_NI])
71AC_SUBST([NTPD_DB])
72AC_SUBST([NTPD_DL])
73AC_SUBST([NTPD_DS])
74AC_SUBST([NTPD_MS])
75AC_SUBST([NTPD_NI])
76AC_SUBST([NTPQ_DB])
77AC_SUBST([NTPQ_DL])
78AC_SUBST([NTPQ_DS])
79AC_SUBST([NTPQ_MS])
80AC_SUBST([NTPQ_NI])
81AC_SUBST([NTPSNMPD_DB])
82AC_SUBST([NTPSNMPD_DL])
83AC_SUBST([NTPSNMPD_DS])
84AC_SUBST([NTPSNMPD_MS])
85AC_SUBST([NTPSNMPD_NI])
86AC_SUBST([NTPSWEEP_DB])
87AC_SUBST([NTPSWEEP_DL])
88AC_SUBST([NTPSWEEP_DS])
89AC_SUBST([NTPSWEEP_MS])
90AC_SUBST([NTPSWEEP_NI])
91AM_CONDITIONAL([INSTALL_NTPSWEEP], [test -z "$NTPSWEEP_NI" ])
92AC_SUBST([NTPTIME_DB])
93AC_SUBST([NTPTIME_DL])
94AC_SUBST([NTPTIME_DS])
95AC_SUBST([NTPTIME_MS])
96AC_SUBST([NTPTIME_NI])
97AC_SUBST([NTPTRACE_DB])
98AC_SUBST([NTPTRACE_DL])
99AC_SUBST([NTPTRACE_DS])
100AC_SUBST([NTPTRACE_MS])
101AC_SUBST([NTPTRACE_NI])
102AC_SUBST([NTP_KEYGEN_DB])
103AC_SUBST([NTP_KEYGEN_DL])
104AC_SUBST([NTP_KEYGEN_DS])
105AC_SUBST([NTP_KEYGEN_MS])
106AC_SUBST([NTP_KEYGEN_NI])
107AC_SUBST([NTP_WAIT_DB])
108AC_SUBST([NTP_WAIT_DL])
109AC_SUBST([NTP_WAIT_DS])
110AC_SUBST([NTP_WAIT_MS])
111AC_SUBST([NTP_WAIT_NI])
112AC_SUBST([SNTP_DB])
113AC_SUBST([SNTP_DL])
114AC_SUBST([SNTP_DS])
115AC_SUBST([SNTP_MS])
116AC_SUBST([SNTP_NI])
117AC_SUBST([TICKADJ_DB])
118AC_SUBST([TICKADJ_DL])
119AC_SUBST([TICKADJ_DS])
120AC_SUBST([TICKADJ_MS])
121AC_SUBST([TICKADJ_NI])
122AC_SUBST([TIMETRIM_DB])
123AC_SUBST([TIMETRIM_DL])
124AC_SUBST([TIMETRIM_DS])
125AC_SUBST([TIMETRIM_MS])
126AC_SUBST([TIMETRIM_NI])
127AC_SUBST([UPDATE_LEAP_DB])
128AC_SUBST([UPDATE_LEAP_DL])
129AC_SUBST([UPDATE_LEAP_DS])
130AC_SUBST([UPDATE_LEAP_MS])
131AC_SUBST([UPDATE_LEAP_NI])
132AM_CONDITIONAL([INSTALL_UPDATE_LEAP], [test -z "$UPDATE_LEAP_NI" ])
133
134])dnl
135dnl ======================================================================
136