From 581641bbf6d44a2863c31f81df1693e3c01600cc Mon Sep 17 00:00:00 2001 From: seb Date: Wed, 13 Mar 2013 15:36:56 +0100 Subject: [PATCH] Fixed a bug where systemd unit file couldn't be installed because PKG_PROG_PKG_CONFIG macro wasn't expanded in configure script. Mail from Peter Schiffer 08/03/2013: I'm writing you regarding a little problem I've noticed when running ./configure script: ./configure: line 3923: PKG_PROG_PKG_CONFIG: command not found checking for systemctl... /bin/systemctl ./configure: line 3975: --variable=systemdsystemunitdir: command not found According to Google, you might be missing pkg-config program in your path while generating configure script from configure.in file. Because of this, systemd unit file won't be installed while doing make install. --- CHANGES | 3 +++ configure | 57 +++++++++++++++++++++++++++++++++++++++++++--------- configure.in | 4 ++-- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index acb8501..076c1d6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Changes: xxxx/xx/xx: Version 10.1.5 - Sebastien Godard (sysstat orange.fr) + * [Peter Schiffer]: systemd unit file couldn't be installed + because PKG_PROG_PKG_CONFIG macro wasn't expanded in configure + script. This is now fixed. * [Benno Schulenberg]: Fixed a small inconsistency in pidstat usage message. diff --git a/configure b/configure index 59943ae..b964cde 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sysstat 10.1.4. +# Generated by GNU Autoconf 2.69 for sysstat 10.1.5. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sysstat' PACKAGE_TARNAME='sysstat' -PACKAGE_VERSION='10.1.4' -PACKAGE_STRING='sysstat 10.1.4' +PACKAGE_VERSION='10.1.5' +PACKAGE_STRING='sysstat 10.1.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -663,6 +663,7 @@ LFSENSORS HAVE_SENSORS SYSTEMD_UNIT_DIR SYSTEMCTL +PKG_CONFIG PATH_CHKCONFIG PATH_CP INSTALL_BIN @@ -1300,7 +1301,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sysstat 10.1.4 to adapt to many kinds of systems. +\`configure' configures sysstat 10.1.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1361,7 +1362,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sysstat 10.1.4:";; + short | recursive ) echo "Configuration of sysstat 10.1.5:";; esac cat <<\_ACEOF @@ -1477,7 +1478,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sysstat configure 10.1.4 +sysstat configure 10.1.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1896,7 +1897,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sysstat $as_me 10.1.4, which was +It was created by sysstat $as_me 10.1.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3920,7 +3921,43 @@ test -n "$PATH_CHKCONFIG" || PATH_CHKCONFIG="chkconfig" # Check for systemd -PKG_PROG_PKG_CONFIG +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PKG_CONFIG"; then + ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PKG_CONFIG="pkg-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PKG_CONFIG=$ac_cv_prog_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + for ac_prog in systemctl do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -5900,7 +5937,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sysstat $as_me 10.1.4, which was +This file was extended by sysstat $as_me 10.1.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5953,7 +5990,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sysstat config.status 10.1.4 +sysstat config.status 10.1.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index f11bd1a..d182027 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ # Modified by Sebastien Godard (sysstat orange.fr) # Initialization of $PACKAGE_VERSION and $PACKAGE_NAME variables -AC_INIT(sysstat, 10.1.4) +AC_INIT(sysstat, 10.1.5) # Ensure that a recent enough version of Autoconf is being used AC_PREREQ(2.53) @@ -40,7 +40,7 @@ AC_PATH_PROGS(PATH_CP, cp, cp, /bin /etc /sbin /usr/bin /usr/etc /usr/sbin /usr/ AC_PATH_PROGS(PATH_CHKCONFIG, chkconfig, chkconfig, /bin /etc /sbin /usr/bin /usr/etc /usr/sbin /usr/ucb /usr/local/bin /usr/local/etc /usr/local/sbin) # Check for systemd -PKG_PROG_PKG_CONFIG +AC_CHECK_PROG(PKG_CONFIG, pkg-config, pkg-config) AC_PATH_PROGS(SYSTEMCTL, systemctl, systemctl, /bin /etc /sbin /usr/bin /usr/etc /usr/sbin /usr/ucb /usr/local/bin /usr/local/etc /usr/local/sbin) AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],[Directory for systemd service files]), -- 2.40.0