Skip to content

Commit a0fbdf8

Browse files
grantmajengelh
authored andcommitted
build: move AC_ARG_WITH(unitdir) within file
$PKG_CONFIG cannot (reliably) be invoked before PKG_PROG_PKG_CONFIG was called, and some Debian 12 installation ran into exaclty that. Move the offending section within the file accordingly.
1 parent 21b0cd4 commit a0fbdf8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configure.ac

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,6 @@ AS_IF([test "$with_gnu_ld" != yes], [NO_VSYM=1])
8282
AC_SUBST([NO_VSYM])
8383

8484

85-
AC_ARG_WITH([unitdir],
86-
[AS_HELP_STRING([--with-unitdir=PATH], [Path to systemd service unit directory])],
87-
[unitdir="$withval"],
88-
[
89-
unitdir=$("$PKG_CONFIG" systemd --variable systemdsystemunitdir 2>/dev/null)
90-
AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'])
91-
])
92-
AC_SUBST([unitdir])
93-
9485
dnl
9586
dnl The cstring header comes from the compiler, but ::strchr comes from the
9687
dnl C library. If the two are not synced up, a problem ensues.
@@ -240,6 +231,15 @@ AC_MSG_RESULT([$mysql_CFLAGS])
240231
AC_MSG_CHECKING([for MySQL libs])
241232
AC_MSG_RESULT([$mysql_LIBS])
242233

234+
AC_ARG_WITH([unitdir],
235+
[AS_HELP_STRING([--with-unitdir=PATH], [Path to systemd service unit directory])],
236+
[unitdir="$withval"],
237+
[
238+
unitdir=$("$PKG_CONFIG" systemd --variable systemdsystemunitdir 2>/dev/null)
239+
AS_IF([test -z "$unitdir"], [unitdir='${prefix}/lib/systemd/system'])
240+
])
241+
AC_SUBST([unitdir])
242+
243243
sysusersdir=$("$PKG_CONFIG" systemd --variable sysusersdir 2>/dev/null)
244244
tmpfilesdir=$("$PKG_CONFIG" systemd --variable tmpfilesdir 2>/dev/null)
245245
AC_ARG_WITH([dcprefix],

0 commit comments

Comments
 (0)