configure.ac
来自「gpsd, a popular GPS daemon.」· AC 代码 · 共 780 行 · 第 1/2 页
AC
780 行
dnl check for True North supportAC_ARG_ENABLE(tnt, AC_HELP_STRING([--enable-tnt], [enable True North Technologies support]), [ac_tnt=$enableval], [ac_tnt=no])AC_MSG_CHECKING([for True North support])if test x"$ac_tnt" = "xyes"; then ac_nmea=yes AC_MSG_RESULT([yes]) AC_DEFINE([TNT_ENABLE], 1, [True North Technologies support]) AC_DEFINE([NMEA_ENABLE], 1, [True North requires NMEA support])else AC_MSG_RESULT([no])fidnl check for UBX supportAC_ARG_ENABLE(ubx, AC_HELP_STRING([--disable-ubx], [disable UBX Protocol support]), [ac_ubx=$enableval], [ac_ubx=yes])AC_MSG_CHECKING([for UBX support])if test x"$ac_ubx" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([UBX_ENABLE], 1, [UBX Protocol support])else AC_MSG_RESULT([no])fidnl check for EverMore supportAC_ARG_ENABLE(evermore, AC_HELP_STRING([--disable-evermore], [disable EverMore binary support]), [ac_evermore=$enableval], [ac_evermore=yes])AC_MSG_CHECKING([for EverMore support])if test x"$ac_evermore" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([EVERMORE_ENABLE], 1, [EverMore binary support])else AC_MSG_RESULT([no])fidnl check for GPSClock supportAC_ARG_ENABLE(gpsclock, AC_HELP_STRING([--disable-gpsclock], [disable GPSClock support]), [ac_gpsclock=$enableval], [ac_gpsclock=yes])AC_MSG_CHECKING([for GPSClock support])if test x"$ac_gpsclock" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([GPSCLOCK_ENABLE], 1, [GPSclock chipset support])else AC_MSG_RESULT([no])fidnl check for RTCM104 supportAC_ARG_ENABLE(rtcm104, AC_HELP_STRING([--disable-rtcm104], [disable rtcm104 support]), [ac_rtcm104=$enableval], [ac_rtcm104=yes])AC_MSG_CHECKING([for rtcm104 support])if test x"$ac_earthmate" = "xno" -a x"$ac_evermore" = "xno" -a x"$ac_garmin" = "xno" -a x"$ac_itrax" = "xno" -a x"$ac_sirf" = "xno" -a x"$ac_tsip" = "xno" -a x"$ac_navcom" = "xno"; then ac_rtcm104=nofiif test x"$ac_rtcm104" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([RTCM104_ENABLE], 1, [rtcm104 binary support])else AC_MSG_RESULT([no])fiAM_CONDITIONAL([HAVE_RTCM104], [test "$ac_rtcm104" = "yes"])dnl check for NTRIP supportAC_ARG_ENABLE(ntrip, AC_HELP_STRING([--disable-ntrip], [disable NTRIP support]), [ac_ntrip=$enableval], [ac_ntrip=yes])AC_MSG_CHECKING([for NTRIP support])if test x"$ac_ntrip" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([NTRIP_ENABLE], 1, [NTRIP support])else AC_MSG_RESULT([no])fiAM_CONDITIONAL([HAVE_NTRIP], [test "$ac_ntrip" = "yes"])dnl check for profiling supportAC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [enable profiling support]), [ac_profiling=$enableval], [ac_profiling=no])AC_MSG_CHECKING([for profiling support])if test x"$ac_profiling" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([PROFILING], 1, [profiling support])else AC_MSG_RESULT([no])fidnl check for NTP time hinting supportAC_ARG_ENABLE(ntpshm, AC_HELP_STRING([--disable-ntpshm], [disable NTP time hinting support]), [ac_ntpshm=$enableval], [ac_ntpshm=yes])AC_MSG_CHECKING([for NTP time hinting support])if test x"$ac_ntpshm" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([NTPSHM_ENABLE], 1, [NTP time hinting support])else AC_MSG_RESULT([no])fidnl check for PPS time syncing supportAC_ARG_ENABLE(pps, AC_HELP_STRING([--disable-pps], [disable PPS time syncing support]), [ac_pps=$enableval], [ac_pps=yes])AC_MSG_CHECKING([for PPS time syncing support])if test x"$ac_pps" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([PPS_ENABLE], 1, [PPS time syncing support])else AC_MSG_RESULT([no])fidnl check for PPS input on CTS lineAC_ARG_ENABLE(pps-on-cts, AC_HELP_STRING([--enable-pps-on-cts], [Enable PPS pulse on CTS rather than DCD]), [ac_ppsoncts=$enableval], [ac_ppsoncts=no])AC_MSG_CHECKING([for PPS pulse on CTS rather than DCD])if test x"$ac_ppsoncts" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([PPS_ON_CTS], 1, [PPS on CTS rather than DCD])else AC_MSG_RESULT([no])fidnl check for privilege revokation user at compile-timeAC_ARG_ENABLE(gpsd-user, AC_HELP_STRING([--enable-gpsd-user=username], [GPSD privilege revokation user]), [ac_user=$enableval], [ac_user=nobody])AC_MSG_CHECKING([privilege revokation user])if test x"$ac_user" != "xnobody"; then AC_MSG_RESULT([$ac_user]) AC_DEFINE_UNQUOTED([GPSD_USER], "$ac_user", [GPSD privilege revokation user])else AC_MSG_RESULT([nobody])fidnl check for port speed fixed at compile-timeAC_ARG_ENABLE(fixed-port-speed, AC_HELP_STRING([--enable-fixed-port-speed=nnn], [compile with fixed serial port speed]), [ac_baud=$enableval], [ac_baud=no])AC_MSG_CHECKING([for fixed port speed])if test x"$ac_baud" != "xno"; then AC_MSG_RESULT([$ac_baud]) AC_DEFINE_UNQUOTED([FIXED_PORT_SPEED], $ac_baud, [Fixed port speed]) FIXED_PORT_SPEED="-DSPEEDFLAGS=$ac_baud"else AC_MSG_RESULT([no])fidnl Manually configure DBUS until we figure out a dnl distro-independent was to check for both libraries and headersAC_ARG_ENABLE(dbus, AC_HELP_STRING([--enable-dbus], [enable DBUS support]), [ac_dbus=$enableval], [ac_dbus=no])AC_MSG_CHECKING([for DBUS support])if test x"$ac_dbus" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([DBUS_ENABLE], 1, [DBUS support]) # Older versions of autotools barf and die on this. #PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.23.4 ) DBUS_CFLAGS=`pkg-config --cflags dbus-glib-1` DBUS_LIBS=`pkg-config --libs dbus-1` AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) #PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.22 ) DBUS_GLIB_LIBS=`pkg-config --libs dbus-glib-1` AC_SUBST(DBUS_GLIB_CFLAGS) AC_SUBST(DBUS_GLIB_LIBS)else AC_MSG_RESULT([no])fidnl check for limited maximum clientsAC_ARG_ENABLE(max-clients, AC_HELP_STRING([--enable-max-clients=nnn], [compile with limited maximum clients]), [ac_maxclients=$enableval], [ac_maxclients=no])AC_MSG_CHECKING([for limited max clients])if test x"$ac_maxclients" != "xno"; then AC_MSG_RESULT([$ac_maxclients]) AC_DEFINE_UNQUOTED([LIMITED_MAX_CLIENTS], $ac_maxclients, [Limited maximum clients]) LIMITED_MAX_CLIENTS="-DLIMITED_MAX_CLIENTS=$ac_maxclients"else AC_MSG_RESULT([no])fidnl check for max number of GPS devicesAC_ARG_ENABLE(max-devices, AC_HELP_STRING([--enable-max-devices=nnn], [compile with maximum allowed devices]), [ac_maxdevices=$enableval], [ac_maxdevices=no])AC_MSG_CHECKING([for max devices])if test x"$ac_maxdevices" != "xno"; then AC_MSG_RESULT([$ac_maxdevices]) AC_DEFINE_UNQUOTED([LIMITED_MAX_DEVICES], $ac_maxdevices, [Maximum gps devices]) LIMITED_MAX_DEVICES="-DLIMITED_MAX_DEVICES=$ac_maxdevices"else AC_MSG_RESULT([no])fidnl allow gpsd to reconfigure gps receiverAC_ARG_ENABLE(reconfigure, AC_HELP_STRING([--disable-reconfigure], [do not allow gpsd to change device settings]), [ac_reconfigure=$enableval], [ac_reconfigure=yes])AC_MSG_CHECKING([if device reconfiguration is allowed])if test x"$ac_reconfigure" != "xno"; then AC_MSG_RESULT([$ac_reconfigure]) AC_DEFINE([ALLOW_RECONFIGURE], 1, [Allow gpsd to reconfigure device])else AC_MSG_RESULT([no])fidnl Automatic check for DBUS.dnl It's broken -- leads to bad compiles on systems with DBUS libraiesdnl but no DBUS headers.dnl ac_dbus=nodnl AC_CHECK_LIB(dbus-1, dbus_bus_get, [true], [false]) # do not update $LIBS dnl if test x"yes" = x"$ac_cv_lib_dbus_1_dbus_bus_get" ; thendnl # Found dbus library, check for required versions and enable itdnl dnl AC_MSG_CHECKING([for DBUS support])dnl PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.23.4,dnl [ac_dbus=yes],[ac_dbus=no])dnl AC_MSG_RESULT([$ac_dbus])dnl AC_SUBST(DBUS_CFLAGS)dnl AC_SUBST(DBUS_LIBS)dnl dnl if test x"ac_dbus" = x"yes" ; thendnl AC_DEFINE([DBUS_ENABLE],1,[Found DBUS libraries])dnl fidnl dnl # Check for glib and dbus-glib, used by gpxloggerdnl PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2.0 )dnl AC_SUBST(GLIB_CFLAGS)dnl AC_SUBST(GLIB_LIBS)dnl dnl PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.22)dnl AC_SUBST(DBUS_GLIB_CFLAGS)dnl AC_SUBST(DBUS_GLIB_LIBS)dnl fiAM_CONDITIONAL([HAVE_DBUS], [test x"$ac_dbus" = x"yes"])dnl mute logging functions?AC_ARG_ENABLE(squelch, AC_HELP_STRING([--enable-squelch], [squelch gpsd_report and gpsd_hexdump to save cpu]), [ac_squelch=$enableval], [ac_squelch=no])AC_MSG_CHECKING([for disabled logging])if test x"$ac_squelch" = "xyes"; then AC_MSG_RESULT([yes]) AC_DEFINE([SQUELCH_ENABLE], 1, [Squelch logging and hexdumps])else AC_MSG_RESULT([no])fidnl Test for XSLT processor (xsltproc or xmlto)AC_CHECK_PROG(WITH_XSLTPROC,[xsltproc],[yes],[no])MANGENERATOR=MANTARGET=MANFLAGS=if test "x$WITH_XSLTPROC" = "xyes"; then AC_MSG_CHECKING([whether xsltproc knows about docbook xsl]) DOCBOOK_URI='http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' cat >conftest.xml <<_EOF <refentry id="foo.1"> <refmeta> <refentrytitle>foo</refentrytitle> <manvolnum>1</manvolnum> <refmiscinfo class='date'>9 Aug 2004</refmiscinfo> </refmeta> <refnamediv id='name'> <refname>foo</refname> <refpurpose>check man page generation from docbook source</refpurpose> </refnamediv> </refentry>_EOF if xsltproc --nonet --noout "$DOCBOOK_URI" conftest.xml >/dev/null 2>&1; then MANGENERATOR=xsltproc MANTARGET="$DOCBOOK_URI" MANFLAGS="--nonet" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f conftest.xml foo.1fiif test x"$MANGENERATOR" = x; then AC_CHECK_PROG(WITH_XMLTO,[xmlto],[yes],[no]) if test "x$WITH_XMLTO" = "xyes"; then MANGENERATOR=xmlto MANTARGET=man MANFLAGS= else AC_MSG_WARN([Neither xsltproc nor xmlto works: I will not build man pages.]) AC_MSG_WARN([To build man pages, install xsltproc/xsltlib or xmlto and run autogen.sh again.]) fifiAM_CONDITIONAL([HAVE_XSLT_PROCESSOR], [test x"$MANGENERATOR" != x])AC_SUBST(MANGENERATOR)AC_SUBST(MANTARGET)AC_SUBST(MANFLAGS)dnl Output the configuration summaryecho ""echo "=========================================="echo "$PACKAGE $VERSION"echo "------------------------------------------"dnl When you add a protocol here, don't forget the null-set check belowecho " Protocols"echo " ---------"echo "Ashtech : $ac_ashtech"echo "Earthmate : $ac_earthmate"echo "EverMore : $ac_evermore"echo "FV-18 : $ac_fv18"echo "Garmin : $ac_garmin"echo "Garmin Simple Text : $ac_garmintxt"echo "iTrax : $ac_itrax"echo "NMEA : $ac_nmea"echo "NTRIP : $ac_ntrip"echo "Navcom : $ac_navcom"echo "RTCM104 : $ac_rtcm104"echo "SiRF : $ac_sirf"echo "Trimble TSIP : $ac_tsip"echo "Tripmate : $ac_tripmate"echo "True North : $ac_tnt"echo "UBX : $ac_ubx"echo "GPSclock : $ac_gpsclock"dnl Below this line are non-protocol switchesecho " Daemon Features"echo " ---------------"echo "NTP SHM : $ac_ntpshm"echo "NTP PPS : $ac_pps"echo -n "PPS input on : " ; case $ac_ppsoncts in yes) echo "CTS" ;; no) echo "DCD" ;; *) echo "Not defined" ;; esac echo "Fixed port speed : $ac_baud"echo "Priv-drop user : $ac_user"echo "Enable shared libraries : $enable_shared"echo "Enable DBUS support : $ac_dbus"echo "Enable X11 support : $ac_x"echo "Enable Python support : $ac_python"echo "Limited max clients : $ac_maxclients"echo "Limited max devices : $ac_maxdevices"echo "Allow device reconfig : $ac_reconfigure"echo "Squelch logging/hexdump : $ac_squelch"echo "Build ncurses programs : $ac_ncurses" echo "------------------------------------------"if test "xdummy" = "xdummy" -a \ x"$ac_earthmate" = "xno" -a \ x"$ac_evermore" = "xno" -a \ x"$ac_fv18" = "xno" -a \ x"$ac_garmin" = "xno" -a \ x"$ac_garmintxt" = "xno" -a \ x"$ac_itrax" = "xno" -a \ x"$ac_navcom" = "xno" -a \ x"$ac_nmea" = "xno" -a \ x"$ac_ntrip" = "xno" -a \ x"$ac_rtcm104" = "xno" -a \ x"$ac_sirf" = "xno" -a \ x"$ac_tnt" = "xno" -a \ x"$ac_tripmate" = "xno" -a \ x"$ac_tsip" = "xno" -a \ x"$ac_ubx" = "xno"; then AC_MSG_ERROR(Can't build gpsd with no protocols enabled)fiAC_OUTPUT(Makefile gpsd.spec libgps.pc libgpsd.pc)echo "Configure finished, type 'make' to build."
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?