]> git.ipfire.org Git - people/ms/network.git/blobdiff - configure.ac
ports: Constify info struct
[people/ms/network.git] / configure.ac
index ba5967dd1dfa68fc1eacc1cc3240584147bd6064..e1baa64bdfb31c2198e65389db7f959487093ae0 100644 (file)
@@ -28,6 +28,8 @@ AC_INIT([network],
 
 AC_CONFIG_AUX_DIR([build-aux])
 
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 AC_PREFIX_DEFAULT([/usr])
 
 AM_INIT_AUTOMAKE([
@@ -65,37 +67,21 @@ AC_PROG_CC_C99
 AC_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 
-AC_USE_SYSTEM_EXTENSIONS
-
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-       -pipe \
        -Wall \
-       -Wextra \
-       -Wno-inline \
-       -Wundef \
-       "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
-       -Wno-unused-parameter \
-       -Wno-unused-result \
-       -fno-strict-aliasing \
-       -ffunction-sections \
-       -fdata-sections \
-       -fstack-protector-all \
-       --param=ssp-buffer-size=4])
-AC_SUBST([OUR_CFLAGS], $with_cflags)
-
-AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
-       [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
-               -Wp,-D_FORTIFY_SOURCE=2])],
-       [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
-AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
+       -Wchar-subscripts \
+       -Wformat-security \
+       -Wmissing-declarations \
+       -Wmissing-prototypes \
+       -Wnested-externs \
+       -Wpointer-arith \
+       -Wshadow \
+       -Wsign-compare \
+       -Wstrict-prototypes \
+       -Wtype-limits \
+])
 
-CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
-       -Wl,--as-needed \
-       -Wl,--no-undefined \
-       -Wl,--gc-sections \
-       -Wl,-z,relro \
-       -Wl,-z,now])
-AC_SUBST([OUR_LDFLAGS], $with_ldflags)
+AC_SUBST([OUR_CFLAGS], $with_cflags)
 
 # ------------------------------------------------------------------------------
 
@@ -158,6 +144,18 @@ AC_ARG_WITH(
 )
 AC_SUBST(dbuspolicydir)
 
+AC_ARG_WITH(
+       [polkitpolicydir],
+       AS_HELP_STRING(
+               [--with-polkitpolicydir=arg],
+               [directory for PolicyKit policies]
+       ),
+       [polkitpolicydir="$withval"],
+       [PKG_CHECK_VAR([polkitpolicydir], [polkit], [actiondir])
+       polkitpolicydir="${datadir}/polkit-1/actions"]
+)
+AC_SUBST(polkitpolicydir)
+
 # ------------------------------------------------------------------------------
 AC_ARG_WITH([systemdsystemunitdir],
        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
@@ -174,6 +172,7 @@ AM_CONDITIONAL(HAVE_UDEV, [test -n "$with_udevdir"])
 
 # ------------------------------------------------------------------------------
 
+PKG_CHECK_MODULES([CAP], [libcap])
 PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0])
 PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
 
@@ -203,6 +202,7 @@ AC_MSG_RESULT([
 
        dbuspolicydir:        ${dbuspolicydir}
        dbussystembusdir:     ${dbussystembusdir}
+       polkitpolicydir:      ${polkitpolicydir}
        systemdsystemunitdir: $systemdsystemunitdir
        udevdir:              $udevdir