xref: /freebsd-src/contrib/ntp/sntp/m4/ntp_sntp.m4 (revision 416ba5c74546f32a993436a99516d35008e9f384)
1*2b15cb3dSCy Schubertdnl ######################################################################
2*2b15cb3dSCy Schubertdnl Common m4sh code SNTP
3*2b15cb3dSCy SchubertAC_DEFUN([NTP_WITHSNTP], [
4*2b15cb3dSCy Schubert
5*2b15cb3dSCy Schubertdnl preset withsntp=no in env to change default to --without-sntp
6*2b15cb3dSCy SchubertAC_MSG_CHECKING([if sntp will be built])
7*2b15cb3dSCy SchubertAC_ARG_WITH(
8*2b15cb3dSCy Schubert    [sntp],
9*2b15cb3dSCy Schubert    [AS_HELP_STRING(
10*2b15cb3dSCy Schubert	[--without-sntp],
11*2b15cb3dSCy Schubert	[- disable building sntp and sntp/tests]
12*2b15cb3dSCy Schubert    )],
13*2b15cb3dSCy Schubert    [],
14*2b15cb3dSCy Schubert    [with_sntp="${withsntp=yes}"]
15*2b15cb3dSCy Schubert)
16*2b15cb3dSCy Schubertcase "$with_sntp" in
17*2b15cb3dSCy Schubert no)
18*2b15cb3dSCy Schubert    SNTP=
19*2b15cb3dSCy Schubert    ;;
20*2b15cb3dSCy Schubert *)
21*2b15cb3dSCy Schubert    SNTP=sntp
22*2b15cb3dSCy Schubert    ;;
23*2b15cb3dSCy Schubertesac
24*2b15cb3dSCy SchubertAC_SUBST([SNTP])
25*2b15cb3dSCy SchubertAM_CONDITIONAL([BUILD_SNTP], [test -n "$SNTP"])
26*2b15cb3dSCy SchubertAC_MSG_RESULT([$with_sntp])
27*2b15cb3dSCy Schubert
28*2b15cb3dSCy Schubert])dnl
29*2b15cb3dSCy Schubertdnl ======================================================================
30