1dnl Process this file with autoconf to produce a configure script. 2 3AC_PREREQ(2.59c) 4AC_INIT([polkit], [0.120], [http://lists.freedesktop.org/mailman/listinfo/polkit-devel], , [http://www.freedesktop.org/wiki/Software/polkit]) 5AM_INIT_AUTOMAKE([]) 6AC_CONFIG_HEADERS(config.h) 7AC_CONFIG_MACRO_DIR([buildutil]) 8m4_include([buildutil/ax_cxx_compile_stdcxx.m4]) 9AM_MAINTAINER_MODE 10 11m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 12 13# Include external mocklibc tool for unit testing 14AC_CONFIG_SUBDIRS([test/mocklibc]) 15 16# libtool versioning - this applies to all libraries in this package 17# 18# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details 19# 20LT_CURRENT=0 21LT_REVISION=0 22LT_AGE=0 23AC_SUBST(LT_CURRENT) 24AC_SUBST(LT_REVISION) 25AC_SUBST(LT_AGE) 26 27AC_USE_SYSTEM_EXTENSIONS 28AC_ISC_POSIX 29AC_PROG_CC 30AC_HEADER_STDC 31AM_PROG_LIBTOOL 32AC_PROG_MAKE_SET 33AC_PROG_LN_S 34AC_SYS_LARGEFILE 35AM_PROG_CC_C_O 36AC_PROG_CXX 37AX_CXX_COMPILE_STDCXX([17], [], [mandatory]) 38 39# Taken from dbus 40AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no) 41AC_ARG_ENABLE(man-pages, [ --enable-man-pages build manual pages],enable_man_pages=$enableval,enable_man_pages=yes) 42 43if test "${enable_man_page}" != no; then 44dnl 45dnl Check for xsltproc 46dnl 47AC_PATH_PROG([XSLTPROC], [xsltproc]) 48 if test -z "$XSLTPROC"; then 49 enable_man_pages=no 50 fi 51fi 52AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes) 53 54GTK_DOC_CHECK([1.3]) 55 56#### gcc warning flags 57 58CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ 59 -pipe \ 60 -Wall \ 61 -Werror=empty-body \ 62 -Werror=strict-prototypes \ 63 -Werror=missing-prototypes \ 64 -Werror=implicit-function-declaration \ 65 "-Werror=format=2 -Werror=format-security -Werror=format-nonliteral" \ 66 -Werror=pointer-arith -Werror=init-self \ 67 -Werror=missing-declarations \ 68 -Werror=return-type \ 69 -Werror=overflow \ 70 -Werror=int-conversion \ 71 -Werror=parenthesis \ 72 -Werror=incompatible-pointer-types \ 73 -Werror=misleading-indentation \ 74 -Werror=missing-include-dirs -Werror=aggregate-return \ 75 -Werror=declaration-after-statement \ 76]) 77AC_SUBST(WARN_CFLAGS) 78 79PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0]) 80AC_SUBST(GLIB_CFLAGS) 81AC_SUBST(GLIB_LIBS) 82 83PKG_CHECK_MODULES(LIBJS, [mozjs-78]) 84 85AC_SUBST(LIBJS_CFLAGS) 86AC_SUBST(LIBJS_CXXFLAGS) 87AC_SUBST(LIBJS_LIBS) 88 89EXPAT_LIB="" 90AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here], 91 [ 92 expat=$withval 93 CPPFLAGS="$CPPFLAGS -I$withval/include" 94 LDFLAGS="$LDFLAGS -L$withval/lib" 95 ] 96 ) 97AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)], 98 [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) 99AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], 100 [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) 101AC_SUBST(EXPAT_LIBS) 102 103AC_CHECK_FUNCS(clearenv fdatasync) 104 105if test "x$GCC" = "xyes"; then 106 LDFLAGS="-Wl,--as-needed $LDFLAGS" 107fi 108 109dnl --------------------------------------------------------------------------- 110dnl - Check whether setnetgrent has a return value 111dnl --------------------------------------------------------------------------- 112AC_CHECK_HEADERS([netgroup.h]) 113AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 114 #include <stddef.h> 115 #ifdef HAVE_NETGROUP_H 116 #include <netgroup.h> 117 #else 118 #include <netdb.h> 119 #endif 120]], [[int r = setnetgrent (NULL);]])], 121[AC_DEFINE([HAVE_SETNETGRENT_RETURN], 1, [Define to 1 if setnetgrent has return value])]) 122 123dnl --------------------------------------------------------------------------- 124dnl - Check whether we want to build test 125dnl --------------------------------------------------------------------------- 126AC_ARG_ENABLE([test], 127 [AS_HELP_STRING([--disable-test], [Do not build tests])], 128 [enable_test=$enableval], [enable_test=yes]) 129 130AM_CONDITIONAL(BUILD_TEST, [test "x$enable_test" = "xyes"]) 131 132dnl --------------------------------------------------------------------------- 133dnl - Select wether to use libsystemd-login, libelogind or ConsoleKit for session tracking 134dnl --------------------------------------------------------------------------- 135 136have_libsystemd=no 137have_libelogind=no 138SESSION_TRACKING=ConsoleKit 139 140AC_ARG_ENABLE([libsystemd-login], 141 [AS_HELP_STRING([--enable-libsystemd-login[=@<:@auto/yes/no@:>@]], [Use libsystemd (auto/yes/no)])], 142 [enable_libsystemd_login=$enableval], 143 [enable_libsystemd_login=auto]) 144if test "$enable_libsystemd_login" != "no"; then 145 PKG_CHECK_MODULES([LIBSYSTEMD], 146 [libsystemd], 147 [have_libsystemd=yes], 148 dnl if libsystemd is not available, fall back to the older libsystemd-login 149 [PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN], 150 [libsystemd-login], 151 [ 152 have_libsystemd=yes 153 LIBSYSTEMD_CFLAGS="$LIBSYSTEMD_LOGIN_CFLAGS" 154 LIBSYSTEMD_LIBS="$LIBSYSTEMD_LOGIN_LIBS" 155 ], 156 [have_libsystemd=no])]) 157 if test "$have_libsystemd" = "yes"; then 158 SESSION_TRACKING=libsystemd-login 159 fi 160fi 161 162AC_ARG_ENABLE([libelogind], 163 [AS_HELP_STRING([--enable-libelogind[=@<:@auto/yes/no@:>@]], [Use libelogind (auto/yes/no)])], 164 [enable_libelogind=$enableval], 165 [enable_libelogind=auto]) 166dnl Using libelogind makes no sense when libsystemd-login is already in use 167if test "$have_libsystemd" = "yes"; then 168 enable_libelogind=no 169fi 170if test "$enable_libelogind" != "no"; then 171 PKG_CHECK_MODULES([LIBELOGIND], 172 [libelogind], 173 [have_libelogind=yes]) 174 if test "$have_libelogind" = "yes"; then 175 SESSION_TRACKING=libelogind 176 fi 177fi 178 179dnl libelogind is a drop-in replacement for libsystemd-login, so using it does 180dnl not need any different actions than using libsystemd-login. 181if test "$SESSION_TRACKING" != "ConsoleKit"; then 182 AC_DEFINE([HAVE_LIBSYSTEMD], 1, [Define to 1 if libsystemd or libelogind is available]) 183 save_LIBS=$LIBS 184 if test "$have_libelogind" = "yes"; then 185 LIBS=$LIBELOGIND_LIBS 186 dnl We have to act like this was libsystemd-login 187 LIBSYSTEMD_CFLAGS=$LIBELOGIND_CFLAGS 188 LIBSYSTEMD_LIBS=$LIBELOGIND_LIBS 189 else 190 LIBS=$LIBSYSTEMD_LIBS 191 fi 192 AC_CHECK_FUNCS(sd_uid_get_display) 193 LIBS=$save_LIBS 194else 195 if test "$enable_libsystemd_login" = "yes"; then 196 AC_MSG_ERROR([libsystemd support requested but libsystemd or libsystemd-login library not found]) 197 fi 198 if test "$enable_libelogind" = "yes"; then 199 AC_MSG_ERROR([libelogind support requested but libelogind library not found]) 200 fi 201fi 202 203AS_IF([test "x$cross_compiling" != "xyes" ], [ 204 AS_IF([test "$have_libsystemd" = "yes"], [ 205 AS_IF([test ! -d /sys/fs/cgroup/systemd/ -a ! -d /sys/fs/cgroup/init.scope ], [ 206 AS_IF([test "$enable_libsystemd_login" = "yes"], [ 207 AC_MSG_WARN([libsystemd requested but system does not appear to be using systemd]) 208 ], [ 209 AC_MSG_ERROR([libsystemd autoconfigured, but system does not appear to use systemd]) 210 ]) 211 ]) 212 ], [ 213 AS_IF([test -d /sys/fs/cgroup/systemd/ ], [ 214 AS_IF([test "$enable_libsystemd_login" = "no" ], [ 215 AC_MSG_WARN([ConsoleKit requested but system appears to use systemd]) 216 ], [ 217 AC_MSG_ERROR([ConsoleKit autoconfigured, but systemd is in use (missing libsystemd or libsystemd-login pkg-config?)]) 218 ]) 219 ]) 220 ]) 221]) 222 223AC_SUBST(LIBSYSTEMD_CFLAGS) 224AC_SUBST(LIBSYSTEMD_LIBS) 225AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes"], [Using libsystemd]) 226 227dnl --------------------------------------------------------------------------- 228dnl - systemd unit / service files 229dnl --------------------------------------------------------------------------- 230 231AC_ARG_WITH([systemdsystemunitdir], 232 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), 233 [], 234 [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) 235if test "x$with_systemdsystemunitdir" != "xno"; then 236 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) 237fi 238AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) 239 240dnl --------------------------------------------------------------------------- 241dnl - User for running polkitd 242dnl --------------------------------------------------------------------------- 243 244AC_ARG_WITH(polkitd_user, AS_HELP_STRING([--with-polkitd-user=<user>],[User for running polkitd (polkitd)])) 245 246if test -z "$with_polkitd_user" ; then 247 POLKITD_USER=polkitd 248else 249 POLKITD_USER=$with_polkitd_user 250fi 251AC_SUBST(POLKITD_USER) 252AC_DEFINE_UNQUOTED(POLKITD_USER,"$POLKITD_USER", [User for running polkitd]) 253 254dnl --------------------------------------------------------------------------- 255dnl - Select which authentication framework to use 256dnl --------------------------------------------------------------------------- 257 258AC_ARG_WITH([authfw], 259 AS_HELP_STRING([--with-authfw=<name>], 260 [Authentication framework (none/pam/shadow)])) 261if ! test -z "$with_authfw" ; then 262 if test x$with_authdb = xdummy ; then 263 if ! test x$with_authfw = xnone ; then 264 AC_MSG_ERROR([Only 'none' is a valid authentication framework for the dummy authorization database]) 265 fi 266 else 267 if test x$with_authfw = xnone ; then 268 AC_MSG_ERROR(['none' is only a valid authentication framework for the dummy authorization database]) 269 fi 270 fi 271 POLKIT_AUTHFW=$with_authfw 272else 273 if test x$with_authdb = xdummy ; then 274 POLKIT_AUTHFW=none 275 else 276 POLKIT_AUTHFW=pam 277 fi 278fi 279 280AC_SUBST(POLKIT_AUTHFW) 281AC_DEFINE_UNQUOTED(POLKIT_AUTHFW,"$POLKIT_AUTHFW", [Authentication Framework to use]) 282 283case $POLKIT_AUTHFW in 284 none) 285 need_pam=no 286 AC_DEFINE(POLKIT_AUTHFW_NONE, 1, [If using no authentication framework]) 287 ;; 288 289 pam) 290 need_pam=yes 291 AC_DEFINE(POLKIT_AUTHFW_PAM, 1, [If using the PAM authentication framework]) 292 ;; 293 294 shadow) 295 need_pam=no 296 AUTH_LIBS="${AUTH_LIBS} -lcrypt" 297 AC_DEFINE(POLKIT_AUTHFW_SHADOW, 1, [If using the Shadow authentication framework]) 298 ;; 299 300 bsdauth) 301 need_pam=no 302 AC_DEFINE(POLKIT_AUTHFW_BSDAUTH, 1, [If using the bsd_auth(3) authentication framework]) 303 ;; 304 305 *) 306 AC_MSG_ERROR([Unknown Authentication Framework: $POLKIT_AUTHFW]) 307 ;; 308esac 309 310AM_CONDITIONAL(POLKIT_AUTHFW_NONE, [test x$POLKIT_AUTHFW = xnone], [Using no authfw]) 311AM_CONDITIONAL(POLKIT_AUTHFW_PAM, [test x$POLKIT_AUTHFW = xpam], [Using PAM authfw]) 312AM_CONDITIONAL(POLKIT_AUTHFW_SHADOW, [test x$POLKIT_AUTHFW = xshadow], [Using Shadow authfw]) 313AM_CONDITIONAL(POLKIT_AUTHFW_BSDAUTH, [test x$POLKIT_AUTHFW = xbsdauth], [Using bsd_auth(3) authfw]) 314 315 316dnl --------------------------------------------------------------------------- 317dnl - Check for PAM 318dnl --------------------------------------------------------------------------- 319 320withval="" 321AC_ARG_WITH(pam-prefix, 322[ --with-pam-prefix=<prefix> specify where pam files go],[ 323if test x$withval != x; then 324 AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.") 325fi]) 326if test x$withval != x; then 327 PAM_PREFIX_UNEXPANDED="$withval" 328else 329 PAM_PREFIX_UNEXPANDED="$sysconfdir" 330fi 331PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED` 332AC_SUBST(PAM_PREFIX) 333 334have_pam=no 335if test "$need_pam" = yes ; then 336 AC_CHECK_LIB(pam, pam_start, have_pam=yes) 337fi 338 339if test x$have_pam = xno; then 340 if test "$need_pam" = yes ; then 341 AC_ERROR([Could not find pam/pam-devel, please install the needed packages.]) 342 fi 343else 344 AUTH_LIBS="${AUTH_LIBS} -lpam" 345 AC_DEFINE(HAVE_PAM, 1, [Define if PAM support is included]) 346 347 # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt. 348 have_timedwait=no 349 AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes]) 350 if test "$have_timedwait" = no ; then 351 AC_CHECK_LIB(rt, sigtimedwait, [AUTH_LIBS="${AUTH_LIBS} -lrt"]) 352 fi 353 354 AC_MSG_CHECKING(how to call pam_strerror) 355 AC_CACHE_VAL(ac_cv_pam_strerror_args, 356 [AC_TRY_COMPILE([#include <stdio.h> 357 #include <stdlib.h> 358 #include <security/pam_appl.h>], 359 [pam_handle_t *pamh = 0; 360 char *s = pam_strerror(pamh, PAM_SUCCESS);], 361 [ac_pam_strerror_args=2], 362 [AC_TRY_COMPILE([#include <stdio.h> 363 #include <stdlib.h> 364 #include <security/pam_appl.h>], 365 [char *s = 366 pam_strerror(PAM_SUCCESS);], 367 [ac_pam_strerror_args=1], 368 [ac_pam_strerror_args=0])]) 369 ac_cv_pam_strerror_args=$ac_pam_strerror_args]) 370 ac_pam_strerror_args=$ac_cv_pam_strerror_args 371 if test "$ac_pam_strerror_args" = 1 ; then 372 AC_MSG_RESULT(one argument) 373 elif test "$ac_pam_strerror_args" = 2 ; then 374 AC_DEFINE(PAM_STRERROR_TWO_ARGS, 1, [Define if pam_strerror takes two arguments]) 375 AC_MSG_RESULT(two arguments) 376 else 377 AC_MSG_RESULT(unknown) 378 fi 379 380fi 381 382AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) 383AC_SUBST(HAVE_PAM) 384AC_SUBST(AUTH_LIBS) 385 386AC_CHECK_HEADER(security/pam_modutil.h, [AC_DEFINE(HAVE_PAM_MODUTIL_H, [], "Have pam_modutil.h")]) 387AC_CHECK_HEADER(security/pam_ext.h, [AC_DEFINE(HAVE_PAM_EXT_H, [], "Have pam_ext.h")]) 388AC_CHECK_LIB(pam, pam_vsyslog, [AC_DEFINE(HAVE_PAM_VSYSLOG, [], "Have pam_vsyslog")]) 389 390AC_ARG_WITH(pam-module-dir, [ --with-pam-module-dir=[dirname] directory to install PAM security module]) 391if ! test -z "$with_pam_module_dir"; then 392 PAM_MODULE_DIR=$with_pam_module_dir 393else 394 PAM_MODULE_DIR="/lib/security" 395fi 396 397AC_SUBST(PAM_MODULE_DIR) 398 399AC_ARG_WITH(os-type, [ --with-os-type=<os> distribution or OS (redhat/suse/gentoo/pardus/solaris/netbsd)]) 400 401#### Check our operating system (distro-tweaks required) 402if test "z$with_os_type" = "z"; then 403 AC_CHECK_FILE(/etc/redhat-release,distro_type="redhat") 404 AC_CHECK_FILE(/etc/SuSE-release,distro_type="suse") 405 AC_CHECK_FILE(/etc/gentoo-release,distro_type="gentoo") 406 AC_CHECK_FILE(/etc/pardus-release,distro_type="pardus") 407 if test "z$distro_type" = "z"; then 408 echo "Linux distribution autodetection failed, specify the distribution to target using --with-os-type=" 409 else 410 operating_system=`echo ${distro_type} | tr '[[:upper:]]' '[[:lower:]]' ` 411 fi 412fi 413 414#### Sort out OS (distro-tweaks required) 415if test x$with_os_type = x; then 416 if test x$operating_system = xredhat ; then 417 with_os_type=redhat 418 elif test x$operating_system = xsuse ; then 419 with_os_type=suse 420 elif test x$operating_system = xgentoo ; then 421 with_os_type=gentoo 422 elif test x$operating_system = xpardus ; then 423 with_os_type=pardus 424 elif test x$operating_system = xsolaris ; then 425 with_os_type=solaris 426 elif test x$operating_system = xfreebsd ; then 427 with_os_type=freebsd 428 elif test x$operating_system = xnetbsd ; then 429 with_os_type=netbsd 430 else 431 case "$host_os" in 432 *netbsd*) 433 with_os_type=netbsd 434 ;; 435 *) 436 with_os_type=unknown 437 :: 438 esac 439 fi 440fi 441 442# (distro-tweaks required) 443AM_CONDITIONAL(OS_TYPE_UNKNOWN, test x$with_os_type = xunknown, [Running on unknown OS]) 444AM_CONDITIONAL(OS_TYPE_RED_HAT, test x$with_os_type = xredhat, [Running on Red Hat OS'es]) 445AM_CONDITIONAL(OS_TYPE_SUSE, test x$with_os_type = xsuse, [Running on SUSE OS'es]) 446AM_CONDITIONAL(OS_TYPE_GENTOO, test x$with_os_type = xgentoo, [Running on Gentoo OS'es]) 447AM_CONDITIONAL(OS_TYPE_PARDUS, test x$with_os_type = xpardus, [Running on Pardus OS'es]) 448AM_CONDITIONAL(OS_TYPE_SOLARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es]) 449AM_CONDITIONAL(OS_TYPE_FREEBSD, test x$with_os_type = xfreebsd, [Running on FreeBSD OS'es]) 450 451AC_ARG_WITH(pam-include, [ --with-pam-include=<file> pam file to include]) 452 453#### Set up pam file to include (distro-tweaks required) 454if ! test -z "$with_pam_include"; then 455 PAM_FILE_INCLUDE_AUTH=$with_pam_include 456 PAM_FILE_INCLUDE_ACCOUNT=$with_pam_include 457 PAM_FILE_INCLUDE_PASSWORD=$with_pam_include 458 PAM_FILE_INCLUDE_SESSION=$with_pam_include 459elif test x$with_os_type = xredhat -o x$with_os_type = xgentoo -o x$with_os_type = xpardus ; then 460 PAM_FILE_INCLUDE_AUTH=system-auth 461 PAM_FILE_INCLUDE_ACCOUNT=system-auth 462 PAM_FILE_INCLUDE_PASSWORD=system-auth 463 PAM_FILE_INCLUDE_SESSION=system-auth 464elif test x$with_os_type = xsuse -o x$with_os_type = xsolaris ; then 465 PAM_FILE_INCLUDE_AUTH=common-auth 466 PAM_FILE_INCLUDE_ACCOUNT=common-account 467 PAM_FILE_INCLUDE_PASSWORD=common-password 468 PAM_FILE_INCLUDE_SESSION=common-session 469elif test x$with_os_type = xfreebsd -o x$with_os_type = xnetbsd; then 470 PAM_FILE_INCLUDE_AUTH=system 471 PAM_FILE_INCLUDE_ACCOUNT=system 472 PAM_FILE_INCLUDE_PASSWORD=system 473 PAM_FILE_INCLUDE_SESSION=system 474else 475 PAM_FILE_INCLUDE_AUTH=system-auth 476 PAM_FILE_INCLUDE_ACCOUNT=system-auth 477 PAM_FILE_INCLUDE_PASSWORD=system-auth 478 PAM_FILE_INCLUDE_SESSION=system-auth 479fi 480 481AC_SUBST(PAM_FILE_INCLUDE_AUTH) 482AC_SUBST(PAM_FILE_INCLUDE_ACCOUNT) 483AC_SUBST(PAM_FILE_INCLUDE_PASSWORD) 484AC_SUBST(PAM_FILE_INCLUDE_SESSION) 485AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_AUTH, "$PAM_FILE_INCLUDE_AUTH", [pam file auth]) 486AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_ACCOUNT, "$PAM_FILE_INCLUDE_ACCOUNT", [pam file account]) 487AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_PASSWORD, "$PAM_FILE_INCLUDE_PASSWORD", [pam file password]) 488AC_DEFINE_UNQUOTED(PAM_FILE_INCLUDE_SESSION, "$PAM_FILE_INCLUDE_SESSION", [pam file session]) 489 490dnl --------------------------------------------------------------------------- 491dnl - check OS 492dnl --------------------------------------------------------------------------- 493case "$host_os" in 494 *linux*) 495 ;; 496 *solaris*) 497 AC_DEFINE([HAVE_SOLARIS], 1, [Is this a Solaris system?]) 498 ;; 499 *freebsd*) 500 AC_DEFINE([HAVE_FREEBSD], 1, [Is this a FreeBSD system?]) 501 ;; 502 *netbsd*) 503 AC_DEFINE([HAVE_NETBSD], 1, [Is this an NetBSD system?]) 504 ;; 505 *openbsd*) 506 AC_DEFINE([HAVE_OPENBSD], 1, [Is this an OpenBSD system?]) 507 ;; 508esac 509 510GOBJECT_INTROSPECTION_CHECK([0.6.2]) 511 512AC_ARG_ENABLE([examples], 513 AS_HELP_STRING([--enable-examples], [Build the example programs]),, 514 [enable_examples=yes]) 515 516AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_examples" = "xyes") 517 518# ******************** 519# Internationalization 520# ******************** 521 522AM_GNU_GETTEXT([external]) 523AM_GNU_GETTEXT_VERSION([0.19.8]) 524AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) 525 526GETTEXT_PACKAGE=polkit-1 527AC_SUBST(GETTEXT_PACKAGE) 528AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[gettext domain]) 529 530AC_ARG_VAR([SUID_CFLAGS], 531 [CFLAGS used for binaries which are usually with the suid bit]) 532AC_ARG_VAR([SUID_LDFLAGS], 533 [LDFLAGS used for binaries which are usually with the suid bit]) 534 535AC_OUTPUT([ 536Makefile 537actions/Makefile 538data/Makefile 539data/polkit-1 540data/polkit-gobject-1.pc 541data/polkit-agent-1.pc 542gettext/Makefile 543gettext/its/Makefile 544src/Makefile 545src/polkit/Makefile 546src/polkitbackend/Makefile 547src/polkitagent/Makefile 548src/programs/Makefile 549src/examples/Makefile 550docs/version.xml 551docs/extensiondir.xml 552docs/Makefile 553docs/polkit/Makefile 554docs/man/Makefile 555po/Makefile.in 556test/Makefile 557test/polkit/Makefile 558test/polkitbackend/Makefile 559]) 560 561dnl ========================================================================== 562echo " 563 polkit $VERSION 564 ================= 565 566 prefix: ${prefix} 567 libdir: ${libdir} 568 libexecdir: ${libexecdir} 569 bindir: ${bindir} 570 sbindir: ${sbindir} 571 datadir: ${datadir} 572 sysconfdir: ${sysconfdir} 573 localstatedir: ${localstatedir} 574 docdir: ${docdir} 575 576 compiler: ${CC} 577 cflags: ${CFLAGS} 578 cppflags: ${CPPFLAGS} 579 xsltproc: ${XSLTPROC} 580 introspection: ${found_introspection} 581 582 Distribution/OS: ${with_os_type} 583 Authentication framework: ${POLKIT_AUTHFW} 584 Session tracking: ${SESSION_TRACKING} 585 PAM support: ${have_pam} 586 systemdsystemunitdir: ${systemdsystemunitdir} 587 polkitd user: ${POLKITD_USER}" 588 589if test "$have_pam" = yes ; then 590echo " 591 PAM file auth: ${PAM_FILE_INCLUDE_AUTH} 592 PAM file account: ${PAM_FILE_INCLUDE_ACCOUNT} 593 PAM file password: ${PAM_FILE_INCLUDE_PASSWORD} 594 PAM file session: ${PAM_FILE_INCLUDE_SESSION}" 595fi 596echo " 597 Maintainer mode: ${USE_MAINTAINER_MODE} 598 Building api docs: ${enable_gtk_doc} 599 Building man pages: ${enable_man_pages} 600 Building examples: ${enable_examples} 601 602" 603 604echo "NOTE: The file ${prefix}/lib/polkit-1/polkit-agent-helper-1 must be owned" 605echo " by root and have mode 4755 (setuid root binary)" 606echo 607 608echo "NOTE: The file ${bindir}/pkexec must be owned by root and" 609echo " have mode 4755 (setuid root binary)" 610echo 611 612echo "NOTE: The directory ${sysconfdir}/polkit-1/rules.d must be owned" 613echo " by user '$POLKITD_USER' and have mode 700" 614echo 615 616echo "NOTE: The directory ${datadir}/polkit-1/rules.d must be owned" 617echo " by user '$POLKITD_USER' and have mode 700" 618echo 619