From 24e6164b0c8de29bf3258a0d11d2ccfb4c83dbf9 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 1 Jul 2013 12:27:02 -0700
Subject: [PATCH] Changed AM_CPPFLAGS to AM_CFLAGS and ran autogen.sh

AM_CPPFLAGS could get overwritten and making it not happen when using
libtool

From http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html

AM_CPPFLAGS is ignored in preference to a per-executable (or per-library)
_CPPFLAGS variable if it is defined.
---
 contribs/pam/Makefile.am                                 | 2 +-
 contribs/pam/Makefile.in                                 | 2 +-
 contribs/perlapi/libslurm/Makefile.am                    | 2 +-
 contribs/perlapi/libslurm/Makefile.in                    | 2 +-
 contribs/perlapi/libslurmdb/Makefile.am                  | 2 +-
 contribs/perlapi/libslurmdb/Makefile.in                  | 2 +-
 src/api/Makefile.am                                      | 2 +-
 src/api/Makefile.in                                      | 2 +-
 src/common/Makefile.am                                   | 2 +-
 src/common/Makefile.in                                   | 2 +-
 src/database/Makefile.am                                 | 2 +-
 src/database/Makefile.in                                 | 2 +-
 src/db_api/Makefile.am                                   | 2 +-
 src/db_api/Makefile.in                                   | 2 +-
 src/plugins/accounting_storage/common/Makefile.am        | 2 +-
 src/plugins/accounting_storage/common/Makefile.in        | 2 +-
 src/plugins/accounting_storage/filetxt/Makefile.am       | 2 +-
 src/plugins/accounting_storage/filetxt/Makefile.in       | 2 +-
 src/plugins/accounting_storage/mysql/Makefile.am         | 2 +-
 src/plugins/accounting_storage/mysql/Makefile.in         | 2 +-
 src/plugins/accounting_storage/none/Makefile.am          | 2 +-
 src/plugins/accounting_storage/none/Makefile.in          | 2 +-
 src/plugins/accounting_storage/pgsql/Makefile.am         | 2 +-
 src/plugins/accounting_storage/pgsql/Makefile.in         | 2 +-
 src/plugins/accounting_storage/slurmdbd/Makefile.am      | 2 +-
 src/plugins/accounting_storage/slurmdbd/Makefile.in      | 2 +-
 src/plugins/acct_gather_energy/ipmi/Makefile.am          | 2 +-
 src/plugins/acct_gather_energy/ipmi/Makefile.in          | 2 +-
 src/plugins/acct_gather_energy/none/Makefile.am          | 2 +-
 src/plugins/acct_gather_energy/none/Makefile.in          | 2 +-
 src/plugins/acct_gather_energy/rapl/Makefile.am          | 2 +-
 src/plugins/acct_gather_energy/rapl/Makefile.in          | 2 +-
 src/plugins/acct_gather_filesystem/lustre/Makefile.am    | 2 +-
 src/plugins/acct_gather_filesystem/lustre/Makefile.in    | 2 +-
 src/plugins/acct_gather_filesystem/none/Makefile.am      | 2 +-
 src/plugins/acct_gather_filesystem/none/Makefile.in      | 2 +-
 src/plugins/acct_gather_infiniband/none/Makefile.am      | 2 +-
 src/plugins/acct_gather_infiniband/none/Makefile.in      | 2 +-
 src/plugins/acct_gather_infiniband/ofed/Makefile.am      | 2 +-
 src/plugins/acct_gather_infiniband/ofed/Makefile.in      | 2 +-
 src/plugins/acct_gather_profile/hdf5/Makefile.am         | 2 +-
 src/plugins/acct_gather_profile/hdf5/Makefile.in         | 2 +-
 src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am | 2 +-
 src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.in | 2 +-
 src/plugins/acct_gather_profile/none/Makefile.am         | 2 +-
 src/plugins/acct_gather_profile/none/Makefile.in         | 2 +-
 src/plugins/auth/authd/Makefile.am                       | 2 +-
 src/plugins/auth/authd/Makefile.in                       | 2 +-
 src/plugins/auth/munge/Makefile.am                       | 2 +-
 src/plugins/auth/munge/Makefile.in                       | 2 +-
 src/plugins/auth/none/Makefile.am                        | 2 +-
 src/plugins/auth/none/Makefile.in                        | 2 +-
 src/plugins/checkpoint/aix/Makefile.am                   | 2 +-
 src/plugins/checkpoint/aix/Makefile.in                   | 2 +-
 src/plugins/checkpoint/blcr/Makefile.am                  | 2 +-
 src/plugins/checkpoint/blcr/Makefile.in                  | 2 +-
 src/plugins/checkpoint/none/Makefile.am                  | 2 +-
 src/plugins/checkpoint/none/Makefile.in                  | 2 +-
 src/plugins/checkpoint/ompi/Makefile.am                  | 2 +-
 src/plugins/checkpoint/ompi/Makefile.in                  | 2 +-
 src/plugins/checkpoint/poe/Makefile.am                   | 2 +-
 src/plugins/checkpoint/poe/Makefile.in                   | 2 +-
 src/plugins/crypto/munge/Makefile.am                     | 2 +-
 src/plugins/crypto/munge/Makefile.in                     | 2 +-
 src/plugins/crypto/openssl/Makefile.am                   | 2 +-
 src/plugins/crypto/openssl/Makefile.in                   | 2 +-
 src/plugins/ext_sensors/none/Makefile.am                 | 2 +-
 src/plugins/ext_sensors/none/Makefile.in                 | 2 +-
 src/plugins/ext_sensors/rrd/Makefile.am                  | 2 +-
 src/plugins/ext_sensors/rrd/Makefile.in                  | 2 +-
 src/plugins/gres/gpu/Makefile.am                         | 2 +-
 src/plugins/gres/gpu/Makefile.in                         | 2 +-
 src/plugins/gres/mic/Makefile.am                         | 2 +-
 src/plugins/gres/mic/Makefile.in                         | 2 +-
 src/plugins/gres/nic/Makefile.am                         | 2 +-
 src/plugins/gres/nic/Makefile.in                         | 2 +-
 src/plugins/job_submit/all_partitions/Makefile.am        | 2 +-
 src/plugins/job_submit/all_partitions/Makefile.in        | 2 +-
 src/plugins/job_submit/cnode/Makefile.am                 | 2 +-
 src/plugins/job_submit/cnode/Makefile.in                 | 2 +-
 src/plugins/job_submit/defaults/Makefile.am              | 2 +-
 src/plugins/job_submit/defaults/Makefile.in              | 2 +-
 src/plugins/job_submit/logging/Makefile.am               | 2 +-
 src/plugins/job_submit/logging/Makefile.in               | 2 +-
 src/plugins/job_submit/lua/Makefile.am                   | 2 +-
 src/plugins/job_submit/lua/Makefile.in                   | 2 +-
 src/plugins/job_submit/partition/Makefile.am             | 2 +-
 src/plugins/job_submit/partition/Makefile.in             | 2 +-
 src/plugins/jobacct_gather/aix/Makefile.am               | 2 +-
 src/plugins/jobacct_gather/aix/Makefile.in               | 2 +-
 src/plugins/jobacct_gather/cgroup/Makefile.am            | 2 +-
 src/plugins/jobacct_gather/cgroup/Makefile.in            | 2 +-
 src/plugins/jobacct_gather/linux/Makefile.am             | 2 +-
 src/plugins/jobacct_gather/linux/Makefile.in             | 2 +-
 src/plugins/jobacct_gather/none/Makefile.am              | 2 +-
 src/plugins/jobacct_gather/none/Makefile.in              | 2 +-
 src/plugins/jobcomp/filetxt/Makefile.am                  | 2 +-
 src/plugins/jobcomp/filetxt/Makefile.in                  | 2 +-
 src/plugins/jobcomp/mysql/Makefile.am                    | 2 +-
 src/plugins/jobcomp/mysql/Makefile.in                    | 2 +-
 src/plugins/jobcomp/none/Makefile.am                     | 2 +-
 src/plugins/jobcomp/none/Makefile.in                     | 2 +-
 src/plugins/jobcomp/pgsql/Makefile.am                    | 2 +-
 src/plugins/jobcomp/pgsql/Makefile.in                    | 2 +-
 src/plugins/jobcomp/script/Makefile.am                   | 2 +-
 src/plugins/jobcomp/script/Makefile.in                   | 2 +-
 src/plugins/launch/aprun/Makefile.am                     | 2 +-
 src/plugins/launch/aprun/Makefile.in                     | 2 +-
 src/plugins/launch/poe/Makefile.am                       | 2 +-
 src/plugins/launch/poe/Makefile.in                       | 2 +-
 src/plugins/launch/runjob/Makefile.am                    | 2 +-
 src/plugins/launch/runjob/Makefile.in                    | 2 +-
 src/plugins/launch/slurm/Makefile.am                     | 2 +-
 src/plugins/launch/slurm/Makefile.in                     | 2 +-
 src/plugins/mpi/lam/Makefile.am                          | 2 +-
 src/plugins/mpi/lam/Makefile.in                          | 2 +-
 src/plugins/mpi/mpich1_p4/Makefile.am                    | 2 +-
 src/plugins/mpi/mpich1_p4/Makefile.in                    | 2 +-
 src/plugins/mpi/mpich1_shmem/Makefile.am                 | 2 +-
 src/plugins/mpi/mpich1_shmem/Makefile.in                 | 2 +-
 src/plugins/mpi/mpichgm/Makefile.am                      | 2 +-
 src/plugins/mpi/mpichgm/Makefile.in                      | 2 +-
 src/plugins/mpi/mpichmx/Makefile.am                      | 2 +-
 src/plugins/mpi/mpichmx/Makefile.in                      | 2 +-
 src/plugins/mpi/mvapich/Makefile.am                      | 2 +-
 src/plugins/mpi/mvapich/Makefile.in                      | 2 +-
 src/plugins/mpi/none/Makefile.am                         | 2 +-
 src/plugins/mpi/none/Makefile.in                         | 2 +-
 src/plugins/mpi/openmpi/Makefile.am                      | 2 +-
 src/plugins/mpi/openmpi/Makefile.in                      | 2 +-
 src/plugins/mpi/pmi2/Makefile.am                         | 2 +-
 src/plugins/mpi/pmi2/Makefile.in                         | 2 +-
 src/plugins/preempt/partition_prio/Makefile.am           | 2 +-
 src/plugins/preempt/partition_prio/Makefile.in           | 2 +-
 src/plugins/preempt/qos/Makefile.am                      | 2 +-
 src/plugins/preempt/qos/Makefile.in                      | 2 +-
 src/plugins/priority/basic/Makefile.am                   | 2 +-
 src/plugins/priority/basic/Makefile.in                   | 2 +-
 src/plugins/priority/multifactor/Makefile.am             | 2 +-
 src/plugins/priority/multifactor/Makefile.in             | 2 +-
 src/plugins/proctrack/aix/Makefile.am                    | 2 +-
 src/plugins/proctrack/aix/Makefile.in                    | 2 +-
 src/plugins/proctrack/cgroup/Makefile.am                 | 2 +-
 src/plugins/proctrack/cgroup/Makefile.in                 | 2 +-
 src/plugins/proctrack/linuxproc/Makefile.am              | 2 +-
 src/plugins/proctrack/linuxproc/Makefile.in              | 2 +-
 src/plugins/proctrack/lua/Makefile.am                    | 2 +-
 src/plugins/proctrack/lua/Makefile.in                    | 2 +-
 src/plugins/proctrack/pgid/Makefile.am                   | 2 +-
 src/plugins/proctrack/pgid/Makefile.in                   | 2 +-
 src/plugins/proctrack/sgi_job/Makefile.am                | 2 +-
 src/plugins/proctrack/sgi_job/Makefile.in                | 2 +-
 src/plugins/sched/backfill/Makefile.am                   | 2 +-
 src/plugins/sched/backfill/Makefile.in                   | 2 +-
 src/plugins/sched/builtin/Makefile.am                    | 2 +-
 src/plugins/sched/builtin/Makefile.in                    | 2 +-
 src/plugins/sched/hold/Makefile.am                       | 2 +-
 src/plugins/sched/hold/Makefile.in                       | 2 +-
 src/plugins/sched/wiki/Makefile.am                       | 2 +-
 src/plugins/sched/wiki/Makefile.in                       | 2 +-
 src/plugins/sched/wiki2/Makefile.am                      | 2 +-
 src/plugins/sched/wiki2/Makefile.in                      | 2 +-
 src/plugins/select/bluegene/Makefile.am                  | 2 +-
 src/plugins/select/bluegene/Makefile.in                  | 2 +-
 src/plugins/select/bluegene/ba/Makefile.am               | 2 +-
 src/plugins/select/bluegene/ba/Makefile.in               | 2 +-
 src/plugins/select/bluegene/ba_bgq/Makefile.am           | 2 +-
 src/plugins/select/bluegene/ba_bgq/Makefile.in           | 2 +-
 src/plugins/select/bluegene/bl/Makefile.am               | 2 +-
 src/plugins/select/bluegene/bl/Makefile.in               | 2 +-
 src/plugins/select/bluegene/bl_bgq/Makefile.am           | 2 +-
 src/plugins/select/bluegene/bl_bgq/Makefile.in           | 2 +-
 src/plugins/select/bluegene/sfree/Makefile.am            | 2 +-
 src/plugins/select/bluegene/sfree/Makefile.in            | 2 +-
 src/plugins/select/cons_res/Makefile.am                  | 2 +-
 src/plugins/select/cons_res/Makefile.in                  | 2 +-
 src/plugins/select/cray/Makefile.am                      | 2 +-
 src/plugins/select/cray/Makefile.in                      | 2 +-
 src/plugins/select/cray/libalps/Makefile.am              | 2 +-
 src/plugins/select/cray/libalps/Makefile.in              | 2 +-
 src/plugins/select/cray/libemulate/Makefile.am           | 2 +-
 src/plugins/select/cray/libemulate/Makefile.in           | 2 +-
 src/plugins/select/linear/Makefile.am                    | 2 +-
 src/plugins/select/linear/Makefile.in                    | 2 +-
 src/plugins/select/serial/Makefile.am                    | 2 +-
 src/plugins/select/serial/Makefile.in                    | 2 +-
 src/plugins/slurmctld/dynalloc/Makefile.am               | 2 +-
 src/plugins/slurmctld/dynalloc/Makefile.in               | 2 +-
 src/plugins/switch/none/Makefile.am                      | 2 +-
 src/plugins/switch/none/Makefile.in                      | 2 +-
 src/plugins/switch/nrt/Makefile.am                       | 2 +-
 src/plugins/switch/nrt/Makefile.in                       | 2 +-
 src/plugins/switch/nrt/libpermapi/Makefile.am            | 2 +-
 src/plugins/switch/nrt/libpermapi/Makefile.in            | 2 +-
 src/plugins/task/affinity/Makefile.am                    | 2 +-
 src/plugins/task/affinity/Makefile.in                    | 2 +-
 src/plugins/task/cgroup/Makefile.am                      | 2 +-
 src/plugins/task/cgroup/Makefile.in                      | 2 +-
 src/plugins/task/none/Makefile.am                        | 2 +-
 src/plugins/task/none/Makefile.in                        | 2 +-
 src/plugins/topology/3d_torus/Makefile.am                | 2 +-
 src/plugins/topology/3d_torus/Makefile.in                | 2 +-
 src/plugins/topology/node_rank/Makefile.am               | 2 +-
 src/plugins/topology/node_rank/Makefile.in               | 2 +-
 src/plugins/topology/none/Makefile.am                    | 2 +-
 src/plugins/topology/none/Makefile.in                    | 2 +-
 src/plugins/topology/tree/Makefile.am                    | 2 +-
 src/plugins/topology/tree/Makefile.in                    | 2 +-
 src/sacct/Makefile.am                                    | 2 +-
 src/sacct/Makefile.in                                    | 2 +-
 src/sacctmgr/Makefile.am                                 | 2 +-
 src/sacctmgr/Makefile.in                                 | 2 +-
 src/salloc/Makefile.am                                   | 2 +-
 src/salloc/Makefile.in                                   | 2 +-
 src/sattach/Makefile.am                                  | 2 +-
 src/sattach/Makefile.in                                  | 2 +-
 src/sbatch/Makefile.am                                   | 2 +-
 src/sbatch/Makefile.in                                   | 2 +-
 src/sbcast/Makefile.am                                   | 2 +-
 src/sbcast/Makefile.in                                   | 2 +-
 src/scancel/Makefile.am                                  | 2 +-
 src/scancel/Makefile.in                                  | 2 +-
 src/scontrol/Makefile.am                                 | 2 +-
 src/scontrol/Makefile.in                                 | 2 +-
 src/sdiag/Makefile.am                                    | 2 +-
 src/sdiag/Makefile.in                                    | 2 +-
 src/sinfo/Makefile.am                                    | 2 +-
 src/sinfo/Makefile.in                                    | 2 +-
 src/slurmctld/Makefile.am                                | 2 +-
 src/slurmctld/Makefile.in                                | 2 +-
 src/slurmd/common/Makefile.am                            | 2 +-
 src/slurmd/common/Makefile.in                            | 2 +-
 src/slurmd/slurmd/Makefile.am                            | 2 +-
 src/slurmd/slurmd/Makefile.in                            | 2 +-
 src/slurmd/slurmstepd/Makefile.am                        | 2 +-
 src/slurmd/slurmstepd/Makefile.in                        | 2 +-
 src/slurmdbd/Makefile.am                                 | 2 +-
 src/slurmdbd/Makefile.in                                 | 2 +-
 src/smap/Makefile.am                                     | 2 +-
 src/smap/Makefile.in                                     | 2 +-
 src/sprio/Makefile.am                                    | 2 +-
 src/sprio/Makefile.in                                    | 2 +-
 src/squeue/Makefile.am                                   | 2 +-
 src/squeue/Makefile.in                                   | 2 +-
 src/sreport/Makefile.am                                  | 2 +-
 src/sreport/Makefile.in                                  | 2 +-
 src/srun/Makefile.am                                     | 2 +-
 src/srun/Makefile.in                                     | 2 +-
 src/srun/libsrun/Makefile.am                             | 2 +-
 src/srun/libsrun/Makefile.in                             | 2 +-
 src/srun_cr/Makefile.am                                  | 2 +-
 src/srun_cr/Makefile.in                                  | 2 +-
 src/sshare/Makefile.am                                   | 2 +-
 src/sshare/Makefile.in                                   | 2 +-
 src/sstat/Makefile.am                                    | 2 +-
 src/sstat/Makefile.in                                    | 2 +-
 src/strigger/Makefile.am                                 | 2 +-
 src/strigger/Makefile.in                                 | 2 +-
 src/sview/Makefile.am                                    | 2 +-
 src/sview/Makefile.in                                    | 2 +-
 testsuite/slurm_unit/api/Makefile.am                     | 2 +-
 testsuite/slurm_unit/api/Makefile.in                     | 2 +-
 testsuite/slurm_unit/api/manual/Makefile.am              | 2 +-
 testsuite/slurm_unit/api/manual/Makefile.in              | 2 +-
 testsuite/slurm_unit/common/Makefile.am                  | 2 +-
 testsuite/slurm_unit/common/Makefile.in                  | 2 +-
 266 files changed, 266 insertions(+), 266 deletions(-)

diff --git a/contribs/pam/Makefile.am b/contribs/pam/Makefile.am
index 799c7e63d26..01e8121e68c 100644
--- a/contribs/pam/Makefile.am
+++ b/contribs/pam/Makefile.am
@@ -4,7 +4,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -fPIC -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -fPIC -I$(top_srcdir) -I$(top_srcdir)/src/common
 PLUGIN_FLAGS = -module --export-dynamic -avoid-version
 
 pkglibdir = $(PAM_DIR)
diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in
index f3b50600361..7890648bbe0 100644
--- a/contribs/pam/Makefile.in
+++ b/contribs/pam/Makefile.in
@@ -399,7 +399,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -fPIC -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -fPIC -I$(top_srcdir) -I$(top_srcdir)/src/common
 PLUGIN_FLAGS = -module --export-dynamic -avoid-version
 @HAVE_PAM_FALSE@pam_lib = 
 @HAVE_PAM_TRUE@pam_lib = pam_slurm.la
diff --git a/contribs/perlapi/libslurm/Makefile.am b/contribs/perlapi/libslurm/Makefile.am
index 5cad2a733ab..94aa20221c8 100644
--- a/contribs/perlapi/libslurm/Makefile.am
+++ b/contribs/perlapi/libslurm/Makefile.am
@@ -149,7 +149,7 @@ distclean-generic:
 		done; \
 	fi
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
 	-DVERSION=\"$(VERSION)\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in
index 243f2b2d0b0..7b72980aa11 100644
--- a/contribs/perlapi/libslurm/Makefile.in
+++ b/contribs/perlapi/libslurm/Makefile.in
@@ -371,7 +371,7 @@ perl_sources = \
 test_sources = \
 	$(perl_dir)/t/00-use.t
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
 	-DVERSION=\"$(VERSION)\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
diff --git a/contribs/perlapi/libslurmdb/Makefile.am b/contribs/perlapi/libslurmdb/Makefile.am
index 7119a15832b..19e8dec261c 100644
--- a/contribs/perlapi/libslurmdb/Makefile.am
+++ b/contribs/perlapi/libslurmdb/Makefile.am
@@ -81,7 +81,7 @@ distclean-generic:
 		done; \
 	fi
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
 	-DVERSION=\"$(VERSION)\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in
index 2ec146697eb..501346f97b2 100644
--- a/contribs/perlapi/libslurmdb/Makefile.in
+++ b/contribs/perlapi/libslurmdb/Makefile.in
@@ -351,7 +351,7 @@ perl_sources = \
 	       $(perl_dir)/slurmdb-perl.h \
 	       $(perl_dir)/cluster.c
 
-AM_CPPFLAGS = \
+AM_CFLAGS = \
 	-DVERSION=\"$(VERSION)\" \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
diff --git a/src/api/Makefile.am b/src/api/Makefile.am
index f5ef0ff0064..eb7d0b33986 100644
--- a/src/api/Makefile.am
+++ b/src/api/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if WITH_GNU_LD
 VERSION_SCRIPT = \
diff --git a/src/api/Makefile.in b/src/api/Makefile.in
index dac933a0c1f..db4715b63da 100644
--- a/src/api/Makefile.in
+++ b/src/api/Makefile.in
@@ -423,7 +423,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 @WITH_GNU_LD_TRUE@VERSION_SCRIPT = \
 @WITH_GNU_LD_TRUE@	version.map
 
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index a0d6325328c..67d3cdc89ff 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -18,7 +18,7 @@ build_unsetenv_src = unsetenv.c unsetenv.h
 extra_unsetenv_src =
 endif
 
-AM_CPPFLAGS     = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
+AM_CFLAGS     = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
 
 noinst_PROGRAMS = libcommon.o libeio.o libspank.o
 # This is needed if compiling on windows
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 4ed97919def..fa227d40f67 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -478,7 +478,7 @@ AUTOMAKE_OPTIONS = foreign
 @HAVE_UNSETENV_TRUE@build_unsetenv_src = 
 @HAVE_UNSETENV_FALSE@extra_unsetenv_src = 
 @HAVE_UNSETENV_TRUE@extra_unsetenv_src = unsetenv.c unsetenv.h
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES) $(HWLOC_CPPFLAGS)
 noinst_LTLIBRARIES = \
 	libcommon.la 			\
 	libdaemonize.la 		\
diff --git a/src/database/Makefile.am b/src/database/Makefile.am
index 46bcf4636e0..059bc1e6b63 100644
--- a/src/database/Makefile.am
+++ b/src/database/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if WITH_MYSQL
 MYSQL_LIB = libslurm_mysql.la
diff --git a/src/database/Makefile.in b/src/database/Makefile.in
index cf7d16c0cf7..3eacd0b55f4 100644
--- a/src/database/Makefile.in
+++ b/src/database/Makefile.in
@@ -391,7 +391,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 @WITH_MYSQL_FALSE@MYSQL_LIB = 
 @WITH_MYSQL_TRUE@MYSQL_LIB = libslurm_mysql.la
 @WITH_MYSQL_TRUE@libslurm_mysql_la_SOURCES = mysql_common.c mysql_common.h
diff --git a/src/db_api/Makefile.am b/src/db_api/Makefile.am
index 246a6c6c670..0163c1118eb 100644
--- a/src/db_api/Makefile.am
+++ b/src/db_api/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 if WITH_GNU_LD
 VERSION_SCRIPT = \
diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in
index f90538a0b19..0d4e20d78af 100644
--- a/src/db_api/Makefile.in
+++ b/src/db_api/Makefile.in
@@ -407,7 +407,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 @WITH_GNU_LD_TRUE@VERSION_SCRIPT = \
 @WITH_GNU_LD_TRUE@	version.map
 
diff --git a/src/plugins/accounting_storage/common/Makefile.am b/src/plugins/accounting_storage/common/Makefile.am
index 53a6071dece..e3d8836742c 100644
--- a/src/plugins/accounting_storage/common/Makefile.am
+++ b/src/plugins/accounting_storage/common/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # making a .la
 
diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in
index 8ff501cc24e..54049766448 100644
--- a/src/plugins/accounting_storage/common/Makefile.in
+++ b/src/plugins/accounting_storage/common/Makefile.in
@@ -363,7 +363,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # making a .la
 noinst_LTLIBRARIES = libaccounting_storage_common.la
diff --git a/src/plugins/accounting_storage/filetxt/Makefile.am b/src/plugins/accounting_storage/filetxt/Makefile.am
index 72a37a48a93..d474b9dbc04 100644
--- a/src/plugins/accounting_storage/filetxt/Makefile.am
+++ b/src/plugins/accounting_storage/filetxt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_filetxt.la
 
diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in
index 02579544b98..47cb33fbccd 100644
--- a/src/plugins/accounting_storage/filetxt/Makefile.in
+++ b/src/plugins/accounting_storage/filetxt/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = accounting_storage_filetxt.la
 accounting_storage_filetxt_la_SOURCES = accounting_storage_filetxt.c \
 		filetxt_jobacct_process.c filetxt_jobacct_process.h
diff --git a/src/plugins/accounting_storage/mysql/Makefile.am b/src/plugins/accounting_storage/mysql/Makefile.am
index d7cfbb3784e..23616916b34 100644
--- a/src/plugins/accounting_storage/mysql/Makefile.am
+++ b/src/plugins/accounting_storage/mysql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AS_MYSQL_SOURCES = accounting_storage_mysql.c accounting_storage_mysql.h \
 		as_mysql_acct.c as_mysql_acct.h \
diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in
index 293840e3fab..cb185693a8f 100644
--- a/src/plugins/accounting_storage/mysql/Makefile.in
+++ b/src/plugins/accounting_storage/mysql/Makefile.in
@@ -446,7 +446,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 AS_MYSQL_SOURCES = accounting_storage_mysql.c accounting_storage_mysql.h \
 		as_mysql_acct.c as_mysql_acct.h \
 		as_mysql_archive.c as_mysql_archive.h \
diff --git a/src/plugins/accounting_storage/none/Makefile.am b/src/plugins/accounting_storage/none/Makefile.am
index a6da95f3338..31e8cf26779 100644
--- a/src/plugins/accounting_storage/none/Makefile.am
+++ b/src/plugins/accounting_storage/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_none.la
 
diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in
index e42930b6bb5..0416589443e 100644
--- a/src/plugins/accounting_storage/none/Makefile.in
+++ b/src/plugins/accounting_storage/none/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = accounting_storage_none.la
 accounting_storage_none_la_SOURCES = accounting_storage_none.c
 accounting_storage_none_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/accounting_storage/pgsql/Makefile.am b/src/plugins/accounting_storage/pgsql/Makefile.am
index b77f560c800..47f1d2e6318 100644
--- a/src/plugins/accounting_storage/pgsql/Makefile.am
+++ b/src/plugins/accounting_storage/pgsql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AS_PG_SOURCES= accounting_storage_pgsql.c accounting_storage_pgsql.h \
 	       as_pg_common.c as_pg_common.h \
diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in
index ff00ace7740..d2bf3f00730 100644
--- a/src/plugins/accounting_storage/pgsql/Makefile.in
+++ b/src/plugins/accounting_storage/pgsql/Makefile.in
@@ -441,7 +441,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 AS_PG_SOURCES = accounting_storage_pgsql.c accounting_storage_pgsql.h \
 	       as_pg_common.c as_pg_common.h \
 	       as_pg_acct.c as_pg_acct.h \
diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.am b/src/plugins/accounting_storage/slurmdbd/Makefile.am
index 8f5b20855ab..42f2f547957 100644
--- a/src/plugins/accounting_storage/slurmdbd/Makefile.am
+++ b/src/plugins/accounting_storage/slurmdbd/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = accounting_storage_slurmdbd.la
 
diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in
index e3f17349d32..c01106cca95 100644
--- a/src/plugins/accounting_storage/slurmdbd/Makefile.in
+++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = accounting_storage_slurmdbd.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/acct_gather_energy/ipmi/Makefile.am b/src/plugins/acct_gather_energy/ipmi/Makefile.am
index 7ec336c4604..faf1e6bad06 100644
--- a/src/plugins/acct_gather_energy/ipmi/Makefile.am
+++ b/src/plugins/acct_gather_energy/ipmi/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
 
 if BUILD_IPMI
 
diff --git a/src/plugins/acct_gather_energy/ipmi/Makefile.in b/src/plugins/acct_gather_energy/ipmi/Makefile.in
index d50e3ac3b44..50eb7aa5697 100644
--- a/src/plugins/acct_gather_energy/ipmi/Makefile.in
+++ b/src/plugins/acct_gather_energy/ipmi/Makefile.in
@@ -411,7 +411,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(FREEIPMI_CPPFLAGS)
 @BUILD_IPMI_TRUE@PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 @BUILD_IPMI_TRUE@pkglib_LTLIBRARIES = acct_gather_energy_ipmi.la
 
diff --git a/src/plugins/acct_gather_energy/none/Makefile.am b/src/plugins/acct_gather_energy/none/Makefile.am
index 337661fd814..510861852bb 100644
--- a/src/plugins/acct_gather_energy/none/Makefile.am
+++ b/src/plugins/acct_gather_energy/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_energy_none.la
 
diff --git a/src/plugins/acct_gather_energy/none/Makefile.in b/src/plugins/acct_gather_energy/none/Makefile.in
index 9e9190344c7..03f9665b9f6 100644
--- a/src/plugins/acct_gather_energy/none/Makefile.in
+++ b/src/plugins/acct_gather_energy/none/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = acct_gather_energy_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/acct_gather_energy/rapl/Makefile.am b/src/plugins/acct_gather_energy/rapl/Makefile.am
index e13073a8037..4b9effb36a4 100644
--- a/src/plugins/acct_gather_energy/rapl/Makefile.am
+++ b/src/plugins/acct_gather_energy/rapl/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_energy_rapl.la
 
diff --git a/src/plugins/acct_gather_energy/rapl/Makefile.in b/src/plugins/acct_gather_energy/rapl/Makefile.in
index d7b7c435c4a..3b6faff7c81 100644
--- a/src/plugins/acct_gather_energy/rapl/Makefile.in
+++ b/src/plugins/acct_gather_energy/rapl/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = acct_gather_energy_rapl.la
 
 # cpu/core energy accounting plugin.
diff --git a/src/plugins/acct_gather_filesystem/lustre/Makefile.am b/src/plugins/acct_gather_filesystem/lustre/Makefile.am
index 529727eedb9..3c4176d28ba 100644
--- a/src/plugins/acct_gather_filesystem/lustre/Makefile.am
+++ b/src/plugins/acct_gather_filesystem/lustre/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
diff --git a/src/plugins/acct_gather_filesystem/lustre/Makefile.in b/src/plugins/acct_gather_filesystem/lustre/Makefile.in
index d1e95201b6a..55782d33487 100644
--- a/src/plugins/acct_gather_filesystem/lustre/Makefile.in
+++ b/src/plugins/acct_gather_filesystem/lustre/Makefile.in
@@ -398,7 +398,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 pkglib_LTLIBRARIES = acct_gather_filesystem_lustre.la
 
diff --git a/src/plugins/acct_gather_filesystem/none/Makefile.am b/src/plugins/acct_gather_filesystem/none/Makefile.am
index 007d84d340a..65f608b17d2 100644
--- a/src/plugins/acct_gather_filesystem/none/Makefile.am
+++ b/src/plugins/acct_gather_filesystem/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_filesystem_none.la
 
diff --git a/src/plugins/acct_gather_filesystem/none/Makefile.in b/src/plugins/acct_gather_filesystem/none/Makefile.in
index aa4d0866cad..7336eea4408 100644
--- a/src/plugins/acct_gather_filesystem/none/Makefile.in
+++ b/src/plugins/acct_gather_filesystem/none/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = acct_gather_filesystem_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/acct_gather_infiniband/none/Makefile.am b/src/plugins/acct_gather_infiniband/none/Makefile.am
index 69d851fcbf6..b6d30b1df08 100644
--- a/src/plugins/acct_gather_infiniband/none/Makefile.am
+++ b/src/plugins/acct_gather_infiniband/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_infiniband_none.la
 
diff --git a/src/plugins/acct_gather_infiniband/none/Makefile.in b/src/plugins/acct_gather_infiniband/none/Makefile.in
index 2523f46c88e..377f06017a0 100644
--- a/src/plugins/acct_gather_infiniband/none/Makefile.in
+++ b/src/plugins/acct_gather_infiniband/none/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = acct_gather_infiniband_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/acct_gather_infiniband/ofed/Makefile.am b/src/plugins/acct_gather_infiniband/ofed/Makefile.am
index e54c4662337..66dd2ffe604 100644
--- a/src/plugins/acct_gather_infiniband/ofed/Makefile.am
+++ b/src/plugins/acct_gather_infiniband/ofed/Makefile.am
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if BUILD_OFED
 
diff --git a/src/plugins/acct_gather_infiniband/ofed/Makefile.in b/src/plugins/acct_gather_infiniband/ofed/Makefile.in
index 324b45854c9..141f2f789b5 100644
--- a/src/plugins/acct_gather_infiniband/ofed/Makefile.in
+++ b/src/plugins/acct_gather_infiniband/ofed/Makefile.in
@@ -407,7 +407,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 @BUILD_OFED_TRUE@PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 @BUILD_OFED_TRUE@pkglib_LTLIBRARIES = acct_gather_infiniband_ofed.la
 
diff --git a/src/plugins/acct_gather_profile/hdf5/Makefile.am b/src/plugins/acct_gather_profile/hdf5/Makefile.am
index 0d3d6f7df53..196a07e8b49 100644
--- a/src/plugins/acct_gather_profile/hdf5/Makefile.am
+++ b/src/plugins/acct_gather_profile/hdf5/Makefile.am
@@ -6,7 +6,7 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # cpu/core energy accounting plugin.
 HDF5_SOURCES = acct_gather_profile_hdf5.c
diff --git a/src/plugins/acct_gather_profile/hdf5/Makefile.in b/src/plugins/acct_gather_profile/hdf5/Makefile.in
index 4823438b265..62299c4aea0 100644
--- a/src/plugins/acct_gather_profile/hdf5/Makefile.in
+++ b/src/plugins/acct_gather_profile/hdf5/Makefile.in
@@ -462,7 +462,7 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # cpu/core energy accounting plugin.
 HDF5_SOURCES = acct_gather_profile_hdf5.c
diff --git a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
index 9d3ac00725f..67a6c4a7e77 100644
--- a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
+++ b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-AM_CPPFLAGS = -I$(top_srcdir) -I../
+AM_CFLAGS = -I$(top_srcdir) -I../
 
 SHDF5_SOURCES = sh5util.c
 
diff --git a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.in b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.in
index 801859c2c0b..a0205238b0c 100644
--- a/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.in
+++ b/src/plugins/acct_gather_profile/hdf5/sh5util/Makefile.in
@@ -377,7 +377,7 @@ AUTOMAKE_OPTIONS = foreign
 
 # Do not put a link to common here.  src/common contains an mpi.h which
 # hdf5 could of been installed with a link to the generic mpi.h.
-AM_CPPFLAGS = -I$(top_srcdir) -I../
+AM_CFLAGS = -I$(top_srcdir) -I../
 SHDF5_SOURCES = sh5util.c
 @BUILD_HDF5_TRUE@sh5util_SOURCES = $(SHDF5_SOURCES)
 @BUILD_HDF5_TRUE@sh5util_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) \
diff --git a/src/plugins/acct_gather_profile/none/Makefile.am b/src/plugins/acct_gather_profile/none/Makefile.am
index 451caab5069..287f0a6367b 100644
--- a/src/plugins/acct_gather_profile/none/Makefile.am
+++ b/src/plugins/acct_gather_profile/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = acct_gather_profile_none.la
 
diff --git a/src/plugins/acct_gather_profile/none/Makefile.in b/src/plugins/acct_gather_profile/none/Makefile.in
index 671ed7d3fce..fca99271802 100644
--- a/src/plugins/acct_gather_profile/none/Makefile.in
+++ b/src/plugins/acct_gather_profile/none/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = acct_gather_profile_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/auth/authd/Makefile.am b/src/plugins/auth/authd/Makefile.am
index 7e44d895476..ed42affb58d 100644
--- a/src/plugins/auth/authd/Makefile.am
+++ b/src/plugins/auth/authd/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_AUTHD
diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in
index c069c375c24..0db76e4d54b 100644
--- a/src/plugins/auth/authd/Makefile.in
+++ b/src/plugins/auth/authd/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # Add your plugin to this line, following the naming conventions.
 @WITH_AUTHD_TRUE@AUTHD = auth_authd.la
diff --git a/src/plugins/auth/munge/Makefile.am b/src/plugins/auth/munge/Makefile.am
index ebf4c04b657..71b2cdc4254 100644
--- a/src/plugins/auth/munge/Makefile.am
+++ b/src/plugins/auth/munge/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_MUNGE
diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in
index d0163896da1..239a88dd6f5 100644
--- a/src/plugins/auth/munge/Makefile.in
+++ b/src/plugins/auth/munge/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 @WITH_MUNGE_TRUE@MUNGE = auth_munge.la
diff --git a/src/plugins/auth/none/Makefile.am b/src/plugins/auth/none/Makefile.am
index 8a597828954..2b3dac90200 100644
--- a/src/plugins/auth/none/Makefile.am
+++ b/src/plugins/auth/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = auth_none.la
 
diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in
index cdd593edd1a..cac6a875864 100644
--- a/src/plugins/auth/none/Makefile.in
+++ b/src/plugins/auth/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = auth_none.la
 
 # Null authentication plugin.
diff --git a/src/plugins/checkpoint/aix/Makefile.am b/src/plugins/checkpoint/aix/Makefile.am
index 514efc76500..d7f52ec822f 100644
--- a/src/plugins/checkpoint/aix/Makefile.am
+++ b/src/plugins/checkpoint/aix/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # AIX checkpoint plugin.
 if HAVE_AIX
diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in
index 0eaa193b1b6..b6107e7ad96 100644
--- a/src/plugins/checkpoint/aix/Makefile.in
+++ b/src/plugins/checkpoint/aix/Makefile.in
@@ -398,7 +398,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # AIX checkpoint plugin.
 @HAVE_AIX_TRUE@pkglib_LTLIBRARIES = checkpoint_aix.la
diff --git a/src/plugins/checkpoint/blcr/Makefile.am b/src/plugins/checkpoint/blcr/Makefile.am
index 5059996a256..7e05301529f 100644
--- a/src/plugins/checkpoint/blcr/Makefile.am
+++ b/src/plugins/checkpoint/blcr/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
+AM_CFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in
index 0c53b407417..60174277c80 100644
--- a/src/plugins/checkpoint/blcr/Makefile.in
+++ b/src/plugins/checkpoint/blcr/Makefile.in
@@ -403,7 +403,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
+AM_CFLAGS = -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/checkpoint/none/Makefile.am b/src/plugins/checkpoint/none/Makefile.am
index bb4cd44805f..9e45a117145 100644
--- a/src/plugins/checkpoint/none/Makefile.am
+++ b/src/plugins/checkpoint/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = checkpoint_none.la
 
diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in
index f4a0d6f0c95..e8efa8a1b49 100644
--- a/src/plugins/checkpoint/none/Makefile.in
+++ b/src/plugins/checkpoint/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = checkpoint_none.la
 
 # Null checkpoint plugin.
diff --git a/src/plugins/checkpoint/ompi/Makefile.am b/src/plugins/checkpoint/ompi/Makefile.am
index 29ad130db93..6fadf650eab 100644
--- a/src/plugins/checkpoint/ompi/Makefile.am
+++ b/src/plugins/checkpoint/ompi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = checkpoint_ompi.la
 
diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in
index ffc7f91e803..67c3d65b5d5 100644
--- a/src/plugins/checkpoint/ompi/Makefile.in
+++ b/src/plugins/checkpoint/ompi/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = checkpoint_ompi.la
 
 # OpenMPI checkpoint plugin.
diff --git a/src/plugins/checkpoint/poe/Makefile.am b/src/plugins/checkpoint/poe/Makefile.am
index 4e631728fbf..82083783062 100644
--- a/src/plugins/checkpoint/poe/Makefile.am
+++ b/src/plugins/checkpoint/poe/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # POE checkpoint plugin.
 if DONT_BUILD
diff --git a/src/plugins/checkpoint/poe/Makefile.in b/src/plugins/checkpoint/poe/Makefile.in
index c042f2d9b4c..6230e525e79 100644
--- a/src/plugins/checkpoint/poe/Makefile.in
+++ b/src/plugins/checkpoint/poe/Makefile.in
@@ -398,7 +398,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 # POE checkpoint plugin.
 # if HAVE_NRT
diff --git a/src/plugins/crypto/munge/Makefile.am b/src/plugins/crypto/munge/Makefile.am
index c4a9bee49ac..d6099899106 100644
--- a/src/plugins/crypto/munge/Makefile.am
+++ b/src/plugins/crypto/munge/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 if WITH_MUNGE
diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in
index e6cd146a5bd..6279005d471 100644
--- a/src/plugins/crypto/munge/Makefile.in
+++ b/src/plugins/crypto/munge/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(MUNGE_CPPFLAGS)
 
 # Add your plugin to this line, following the naming conventions.
 @WITH_MUNGE_TRUE@MUNGE = crypto_munge.la
diff --git a/src/plugins/crypto/openssl/Makefile.am b/src/plugins/crypto/openssl/Makefile.am
index b997cae66a7..a6a79157b51 100644
--- a/src/plugins/crypto/openssl/Makefile.am
+++ b/src/plugins/crypto/openssl/Makefile.am
@@ -10,7 +10,7 @@ endif
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = $(openssl_lib)
 
diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in
index bb9d4439fa5..a2801a9df84 100644
--- a/src/plugins/crypto/openssl/Makefile.in
+++ b/src/plugins/crypto/openssl/Makefile.in
@@ -402,7 +402,7 @@ AUTOMAKE_OPTIONS = foreign
 @HAVE_OPENSSL_FALSE@openssl_lib = 
 @HAVE_OPENSSL_TRUE@openssl_lib = crypto_openssl.la
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) $(SSL_CPPFLAGS) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = $(openssl_lib)
 @HAVE_OPENSSL_TRUE@crypto_openssl_la_SOURCES = crypto_openssl.c
 @HAVE_OPENSSL_TRUE@crypto_openssl_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(SSL_LDFLAGS)
diff --git a/src/plugins/ext_sensors/none/Makefile.am b/src/plugins/ext_sensors/none/Makefile.am
index adac0555c8e..1abeaae942b 100644
--- a/src/plugins/ext_sensors/none/Makefile.am
+++ b/src/plugins/ext_sensors/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = ext_sensors_none.la
 
diff --git a/src/plugins/ext_sensors/none/Makefile.in b/src/plugins/ext_sensors/none/Makefile.in
index 1fdc6efe8cc..9fdad8fcfb4 100644
--- a/src/plugins/ext_sensors/none/Makefile.in
+++ b/src/plugins/ext_sensors/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = ext_sensors_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/ext_sensors/rrd/Makefile.am b/src/plugins/ext_sensors/rrd/Makefile.am
index c8c25b14d26..cbad6250862 100644
--- a/src/plugins/ext_sensors/rrd/Makefile.am
+++ b/src/plugins/ext_sensors/rrd/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
 
 if BUILD_RRD
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/ext_sensors/rrd/Makefile.in b/src/plugins/ext_sensors/rrd/Makefile.in
index f7f565f84b0..456d5295e3d 100644
--- a/src/plugins/ext_sensors/rrd/Makefile.in
+++ b/src/plugins/ext_sensors/rrd/Makefile.in
@@ -401,7 +401,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common  $(RRDTOOL_CPPFLAGS)
 @BUILD_RRD_TRUE@PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 @BUILD_RRD_TRUE@pkglib_LTLIBRARIES = ext_sensors_rrd.la
 
diff --git a/src/plugins/gres/gpu/Makefile.am b/src/plugins/gres/gpu/Makefile.am
index 8b8196b69ab..af3338c6f7c 100644
--- a/src/plugins/gres/gpu/Makefile.am
+++ b/src/plugins/gres/gpu/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_gpu.la
 
diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in
index 1346e37ecb0..8ecc34cbd62 100644
--- a/src/plugins/gres/gpu/Makefile.in
+++ b/src/plugins/gres/gpu/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 pkglib_LTLIBRARIES = gres_gpu.la
 
 # Gres GPU plugin.
diff --git a/src/plugins/gres/mic/Makefile.am b/src/plugins/gres/mic/Makefile.am
index cfad49e4a02..ae6418b0b77 100644
--- a/src/plugins/gres/mic/Makefile.am
+++ b/src/plugins/gres/mic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_mic.la
 
diff --git a/src/plugins/gres/mic/Makefile.in b/src/plugins/gres/mic/Makefile.in
index a87c7319b4a..a2d92435571 100644
--- a/src/plugins/gres/mic/Makefile.in
+++ b/src/plugins/gres/mic/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 pkglib_LTLIBRARIES = gres_mic.la
 
 # Gres MIC plugin.
diff --git a/src/plugins/gres/nic/Makefile.am b/src/plugins/gres/nic/Makefile.am
index 674ed3abf0c..f38a8bb48e1 100644
--- a/src/plugins/gres/nic/Makefile.am
+++ b/src/plugins/gres/nic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 
 pkglib_LTLIBRARIES = gres_nic.la
 
diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in
index 63ca8cdd84c..06200d258ee 100644
--- a/src/plugins/gres/nic/Makefile.in
+++ b/src/plugins/gres/nic/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(HWLOC_CPPFLAGS)
 pkglib_LTLIBRARIES = gres_nic.la
 
 # Gres NIC plugin.
diff --git a/src/plugins/job_submit/all_partitions/Makefile.am b/src/plugins/job_submit/all_partitions/Makefile.am
index e1f56a1664c..596c273930e 100644
--- a/src/plugins/job_submit/all_partitions/Makefile.am
+++ b/src/plugins/job_submit/all_partitions/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_all_partitions.la
 
diff --git a/src/plugins/job_submit/all_partitions/Makefile.in b/src/plugins/job_submit/all_partitions/Makefile.in
index 924f37e1da1..54031ad6906 100644
--- a/src/plugins/job_submit/all_partitions/Makefile.in
+++ b/src/plugins/job_submit/all_partitions/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = job_submit_all_partitions.la
 
 # Job submit all_partitions plugin.
diff --git a/src/plugins/job_submit/cnode/Makefile.am b/src/plugins/job_submit/cnode/Makefile.am
index 0a0e897a9e9..5de912a9fb3 100644
--- a/src/plugins/job_submit/cnode/Makefile.am
+++ b/src/plugins/job_submit/cnode/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_cnode.la
 
diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in
index 92934ce9589..489a44fe7a8 100644
--- a/src/plugins/job_submit/cnode/Makefile.in
+++ b/src/plugins/job_submit/cnode/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = job_submit_cnode.la
 
 # Job submit cnode plugin.
diff --git a/src/plugins/job_submit/defaults/Makefile.am b/src/plugins/job_submit/defaults/Makefile.am
index e7182cf8fc5..a69ae77af34 100644
--- a/src/plugins/job_submit/defaults/Makefile.am
+++ b/src/plugins/job_submit/defaults/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_defaults.la
 
diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in
index 80b2ec89cd9..2d378cebe0b 100644
--- a/src/plugins/job_submit/defaults/Makefile.in
+++ b/src/plugins/job_submit/defaults/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = job_submit_defaults.la
 
 # Job submit defaults plugin.
diff --git a/src/plugins/job_submit/logging/Makefile.am b/src/plugins/job_submit/logging/Makefile.am
index 0326d122048..52c5c94869b 100644
--- a/src/plugins/job_submit/logging/Makefile.am
+++ b/src/plugins/job_submit/logging/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_logging.la
 
diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in
index 0be02b4f0b7..3ac613ad711 100644
--- a/src/plugins/job_submit/logging/Makefile.in
+++ b/src/plugins/job_submit/logging/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = job_submit_logging.la
 
 # Job submit logging plugin.
diff --git a/src/plugins/job_submit/lua/Makefile.am b/src/plugins/job_submit/lua/Makefile.am
index 2a94e23d64a..a45b90f83ad 100644
--- a/src/plugins/job_submit/lua/Makefile.am
+++ b/src/plugins/job_submit/lua/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+AM_CFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in
index 7b18011ac97..7ae93e2c333 100644
--- a/src/plugins/job_submit/lua/Makefile.in
+++ b/src/plugins/job_submit/lua/Makefile.in
@@ -397,7 +397,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+AM_CFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
diff --git a/src/plugins/job_submit/partition/Makefile.am b/src/plugins/job_submit/partition/Makefile.am
index c6aef859c10..151a17ef2e8 100644
--- a/src/plugins/job_submit/partition/Makefile.am
+++ b/src/plugins/job_submit/partition/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = job_submit_partition.la
 
diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in
index 7618683ac2f..9fc0912a6b7 100644
--- a/src/plugins/job_submit/partition/Makefile.in
+++ b/src/plugins/job_submit/partition/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = job_submit_partition.la
 
 # Job submit partition plugin.
diff --git a/src/plugins/jobacct_gather/aix/Makefile.am b/src/plugins/jobacct_gather/aix/Makefile.am
index 1a9ccc3f146..aad35993797 100644
--- a/src/plugins/jobacct_gather/aix/Makefile.am
+++ b/src/plugins/jobacct_gather/aix/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_aix.la
 
diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in
index 5e1dad1d83a..177bd5793af 100644
--- a/src/plugins/jobacct_gather/aix/Makefile.in
+++ b/src/plugins/jobacct_gather/aix/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobacct_gather_aix.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/jobacct_gather/cgroup/Makefile.am b/src/plugins/jobacct_gather/cgroup/Makefile.am
index 50a6e0c859c..d7d0499bc39 100644
--- a/src/plugins/jobacct_gather/cgroup/Makefile.am
+++ b/src/plugins/jobacct_gather/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_cgroup.la
 
diff --git a/src/plugins/jobacct_gather/cgroup/Makefile.in b/src/plugins/jobacct_gather/cgroup/Makefile.in
index af1ce262c48..22a7638a4d0 100644
--- a/src/plugins/jobacct_gather/cgroup/Makefile.in
+++ b/src/plugins/jobacct_gather/cgroup/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobacct_gather_cgroup.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/jobacct_gather/linux/Makefile.am b/src/plugins/jobacct_gather/linux/Makefile.am
index a8ae60858b8..a83c800eed9 100644
--- a/src/plugins/jobacct_gather/linux/Makefile.am
+++ b/src/plugins/jobacct_gather/linux/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_linux.la
 
diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in
index 849f0336688..7dfbf959c74 100644
--- a/src/plugins/jobacct_gather/linux/Makefile.in
+++ b/src/plugins/jobacct_gather/linux/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobacct_gather_linux.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/jobacct_gather/none/Makefile.am b/src/plugins/jobacct_gather/none/Makefile.am
index 412fdf81e46..ded2238d082 100644
--- a/src/plugins/jobacct_gather/none/Makefile.am
+++ b/src/plugins/jobacct_gather/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobacct_gather_none.la
 
diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in
index 2fae83bd037..6de1ffc30b8 100644
--- a/src/plugins/jobacct_gather/none/Makefile.in
+++ b/src/plugins/jobacct_gather/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobacct_gather_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/jobcomp/filetxt/Makefile.am b/src/plugins/jobcomp/filetxt/Makefile.am
index aff5faddcd9..48f183ccec4 100644
--- a/src/plugins/jobcomp/filetxt/Makefile.am
+++ b/src/plugins/jobcomp/filetxt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_filetxt.la
 
diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in
index 0b14d866f75..75118d5d2cf 100644
--- a/src/plugins/jobcomp/filetxt/Makefile.in
+++ b/src/plugins/jobcomp/filetxt/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobcomp_filetxt.la
 
 # Text file job completion logging plugin.
diff --git a/src/plugins/jobcomp/mysql/Makefile.am b/src/plugins/jobcomp/mysql/Makefile.am
index 962b9fe6944..e05a4e0c432 100644
--- a/src/plugins/jobcomp/mysql/Makefile.am
+++ b/src/plugins/jobcomp/mysql/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if WITH_MYSQL
 pkglib_LTLIBRARIES = jobcomp_mysql.la
diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in
index 672606829c5..f5c97e738bd 100644
--- a/src/plugins/jobcomp/mysql/Makefile.in
+++ b/src/plugins/jobcomp/mysql/Makefile.in
@@ -402,7 +402,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 @WITH_MYSQL_TRUE@pkglib_LTLIBRARIES = jobcomp_mysql.la
 
 # Mysql storage plugin.
diff --git a/src/plugins/jobcomp/none/Makefile.am b/src/plugins/jobcomp/none/Makefile.am
index 82ed6f232ca..dd4cdd8fee2 100644
--- a/src/plugins/jobcomp/none/Makefile.am
+++ b/src/plugins/jobcomp/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_none.la
 
diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in
index 778f14e71d1..8ebd0670796 100644
--- a/src/plugins/jobcomp/none/Makefile.in
+++ b/src/plugins/jobcomp/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobcomp_none.la
 
 # Null job completion logging plugin.
diff --git a/src/plugins/jobcomp/pgsql/Makefile.am b/src/plugins/jobcomp/pgsql/Makefile.am
index 9ea9e3724ac..02ba675088c 100644
--- a/src/plugins/jobcomp/pgsql/Makefile.am
+++ b/src/plugins/jobcomp/pgsql/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for jobcomp/pgsql plugin
 
-AM_CPPFLAGS = $(PGSQL_CFLAGS) \
+AM_CFLAGS = $(PGSQL_CFLAGS) \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common
 AUTOMAKE_OPTIONS = foreign
 
diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in
index 1f2b0e64f02..07a19bc5ef8 100644
--- a/src/plugins/jobcomp/pgsql/Makefile.in
+++ b/src/plugins/jobcomp/pgsql/Makefile.in
@@ -400,7 +400,7 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CPPFLAGS = $(PGSQL_CFLAGS) \
+AM_CFLAGS = $(PGSQL_CFLAGS) \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AUTOMAKE_OPTIONS = foreign
diff --git a/src/plugins/jobcomp/script/Makefile.am b/src/plugins/jobcomp/script/Makefile.am
index c6f1f953fb8..1581c5b3563 100644
--- a/src/plugins/jobcomp/script/Makefile.am
+++ b/src/plugins/jobcomp/script/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = jobcomp_script.la
 
diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in
index ff9b592bd47..b6be4daa4c1 100644
--- a/src/plugins/jobcomp/script/Makefile.in
+++ b/src/plugins/jobcomp/script/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = jobcomp_script.la
 
 # Text file job completion logging plugin.
diff --git a/src/plugins/launch/aprun/Makefile.am b/src/plugins/launch/aprun/Makefile.am
index 4de9130db4f..eec5c8e90e9 100644
--- a/src/plugins/launch/aprun/Makefile.am
+++ b/src/plugins/launch/aprun/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_aprun.la
 
diff --git a/src/plugins/launch/aprun/Makefile.in b/src/plugins/launch/aprun/Makefile.in
index 6ccade1174b..d7cc76daaf9 100644
--- a/src/plugins/launch/aprun/Makefile.in
+++ b/src/plugins/launch/aprun/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = launch_aprun.la
 launch_aprun_la_SOURCES = launch_aprun.c
 launch_aprun_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/launch/poe/Makefile.am b/src/plugins/launch/poe/Makefile.am
index fa20600b3c1..8f75ca183e2 100644
--- a/src/plugins/launch/poe/Makefile.am
+++ b/src/plugins/launch/poe/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_poe.la
 
diff --git a/src/plugins/launch/poe/Makefile.in b/src/plugins/launch/poe/Makefile.in
index 18e2a571b9d..0745982c6d6 100644
--- a/src/plugins/launch/poe/Makefile.in
+++ b/src/plugins/launch/poe/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = launch_poe.la
 launch_poe_la_SOURCES = launch_poe.c
 launch_poe_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/launch/runjob/Makefile.am b/src/plugins/launch/runjob/Makefile.am
index 9812e8a57df..4b42c5f7adb 100644
--- a/src/plugins/launch/runjob/Makefile.am
+++ b/src/plugins/launch/runjob/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 pkglib_LTLIBRARIES = launch_runjob.la
 
diff --git a/src/plugins/launch/runjob/Makefile.in b/src/plugins/launch/runjob/Makefile.in
index b7a3e5b2ec1..f22e21eb78d 100644
--- a/src/plugins/launch/runjob/Makefile.in
+++ b/src/plugins/launch/runjob/Makefile.in
@@ -406,7 +406,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES)
 pkglib_LTLIBRARIES = launch_runjob.la
 launch_runjob_la_SOURCES = launch_runjob.c $(am__append_1)
 # because totalview needs the libraries on load we link in srun and not here.
diff --git a/src/plugins/launch/slurm/Makefile.am b/src/plugins/launch/slurm/Makefile.am
index cd585bdc4ed..ef69669e58c 100644
--- a/src/plugins/launch/slurm/Makefile.am
+++ b/src/plugins/launch/slurm/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = launch_slurm.la
 
diff --git a/src/plugins/launch/slurm/Makefile.in b/src/plugins/launch/slurm/Makefile.in
index ae27355b9a9..72f80713adf 100644
--- a/src/plugins/launch/slurm/Makefile.in
+++ b/src/plugins/launch/slurm/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = launch_slurm.la
 launch_slurm_la_SOURCES = launch_slurm.c task_state.c
 launch_slurm_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/mpi/lam/Makefile.am b/src/plugins/mpi/lam/Makefile.am
index d9e6af44d25..3776345cb16 100644
--- a/src/plugins/mpi/lam/Makefile.am
+++ b/src/plugins/mpi/lam/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_lam.la
 
diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in
index d352b61da99..cd11d8ba06a 100644
--- a/src/plugins/mpi/lam/Makefile.in
+++ b/src/plugins/mpi/lam/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_lam.la
 mpi_lam_la_SOURCES = mpi_lam.c lam.h
 mpi_lam_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/mpi/mpich1_p4/Makefile.am b/src/plugins/mpi/mpich1_p4/Makefile.am
index ae22d173de2..067ea305cbe 100644
--- a/src/plugins/mpi/mpich1_p4/Makefile.am
+++ b/src/plugins/mpi/mpich1_p4/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpich1_p4.la
 
diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in
index dda43cfec47..28b646fb822 100644
--- a/src/plugins/mpi/mpich1_p4/Makefile.in
+++ b/src/plugins/mpi/mpich1_p4/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_mpich1_p4.la
 
 # Null MPI plugin.
diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.am b/src/plugins/mpi/mpich1_shmem/Makefile.am
index 489e5f2f7c5..7e4445760cf 100644
--- a/src/plugins/mpi/mpich1_shmem/Makefile.am
+++ b/src/plugins/mpi/mpich1_shmem/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpich1_shmem.la
 
diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in
index 2aefce1f116..890bc1bf445 100644
--- a/src/plugins/mpi/mpich1_shmem/Makefile.in
+++ b/src/plugins/mpi/mpich1_shmem/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_mpich1_shmem.la
 mpi_mpich1_shmem_la_SOURCES = mpich1_shmem.c
 mpi_mpich1_shmem_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/mpi/mpichgm/Makefile.am b/src/plugins/mpi/mpichgm/Makefile.am
index cbeb0964c97..da9809f534c 100644
--- a/src/plugins/mpi/mpichgm/Makefile.am
+++ b/src/plugins/mpi/mpichgm/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpichgm.la
 
diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in
index bcf76adb859..e6bed16f73c 100644
--- a/src/plugins/mpi/mpichgm/Makefile.in
+++ b/src/plugins/mpi/mpichgm/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_mpichgm.la
 
 # Null switch plugin.
diff --git a/src/plugins/mpi/mpichmx/Makefile.am b/src/plugins/mpi/mpichmx/Makefile.am
index 47a2611c3c8..76a6ad4ea5e 100644
--- a/src/plugins/mpi/mpichmx/Makefile.am
+++ b/src/plugins/mpi/mpichmx/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mpichmx.la
 
diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in
index 1ae568e0440..d3d95931fb2 100644
--- a/src/plugins/mpi/mpichmx/Makefile.in
+++ b/src/plugins/mpi/mpichmx/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_mpichmx.la
 
 # Null switch plugin.
diff --git a/src/plugins/mpi/mvapich/Makefile.am b/src/plugins/mpi/mvapich/Makefile.am
index 1a0ab1c84e8..59e8fd51900 100644
--- a/src/plugins/mpi/mvapich/Makefile.am
+++ b/src/plugins/mpi/mvapich/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_mvapich.la
 
diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in
index d8be6630862..92c418bfc03 100644
--- a/src/plugins/mpi/mvapich/Makefile.in
+++ b/src/plugins/mpi/mvapich/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_mvapich.la
 mpi_mvapich_la_SOURCES = mpi_mvapich.c mvapich.c mvapich.h\
 	$(top_srcdir)/src/common/mpi.h
diff --git a/src/plugins/mpi/none/Makefile.am b/src/plugins/mpi/none/Makefile.am
index 2b4ace0f397..db1fdaa0b97 100644
--- a/src/plugins/mpi/none/Makefile.am
+++ b/src/plugins/mpi/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_none.la
 
diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in
index 986eba648fb..8413c858fd0 100644
--- a/src/plugins/mpi/none/Makefile.in
+++ b/src/plugins/mpi/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_none.la
 
 # Null MPI plugin.
diff --git a/src/plugins/mpi/openmpi/Makefile.am b/src/plugins/mpi/openmpi/Makefile.am
index ea0a0d3d7b3..4a32f42804d 100644
--- a/src/plugins/mpi/openmpi/Makefile.am
+++ b/src/plugins/mpi/openmpi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_openmpi.la
 
diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in
index 32cda487a40..6b74151d633 100644
--- a/src/plugins/mpi/openmpi/Makefile.in
+++ b/src/plugins/mpi/openmpi/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_openmpi.la
 
 # OpenMPI MPI plugin.
diff --git a/src/plugins/mpi/pmi2/Makefile.am b/src/plugins/mpi/pmi2/Makefile.am
index d1851349009..f1f0f2feb6c 100644
--- a/src/plugins/mpi/pmi2/Makefile.am
+++ b/src/plugins/mpi/pmi2/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic 
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = mpi_pmi2.la
 
diff --git a/src/plugins/mpi/pmi2/Makefile.in b/src/plugins/mpi/pmi2/Makefile.in
index 21c825df9e2..9f56dc41a61 100644
--- a/src/plugins/mpi/pmi2/Makefile.in
+++ b/src/plugins/mpi/pmi2/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = mpi_pmi2.la
 mpi_pmi2_la_SOURCES = mpi_pmi2.c \
 	agent.c agent.h \
diff --git a/src/plugins/preempt/partition_prio/Makefile.am b/src/plugins/preempt/partition_prio/Makefile.am
index 8c69124fe3f..f4e94c2c2f9 100644
--- a/src/plugins/preempt/partition_prio/Makefile.am
+++ b/src/plugins/preempt/partition_prio/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = preempt_partition_prio.la
 
diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in
index 8d14ac96e7c..8b7e71bd464 100644
--- a/src/plugins/preempt/partition_prio/Makefile.in
+++ b/src/plugins/preempt/partition_prio/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = preempt_partition_prio.la
 preempt_partition_prio_la_SOURCES = preempt_partition_prio.c
 preempt_partition_prio_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/preempt/qos/Makefile.am b/src/plugins/preempt/qos/Makefile.am
index 77d712bd5cb..16660374115 100644
--- a/src/plugins/preempt/qos/Makefile.am
+++ b/src/plugins/preempt/qos/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = preempt_qos.la
 
diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in
index cb86d8b16d7..f89e97d48cd 100644
--- a/src/plugins/preempt/qos/Makefile.in
+++ b/src/plugins/preempt/qos/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = preempt_qos.la
 preempt_qos_la_SOURCES = preempt_qos.c
 preempt_qos_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/priority/basic/Makefile.am b/src/plugins/priority/basic/Makefile.am
index a9005771736..fb0b40b3d33 100644
--- a/src/plugins/priority/basic/Makefile.am
+++ b/src/plugins/priority/basic/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = priority_basic.la
 
diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in
index a0bbbabab94..6bf91630bf5 100644
--- a/src/plugins/priority/basic/Makefile.in
+++ b/src/plugins/priority/basic/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = priority_basic.la
 
 # basic priority logging plugin.
diff --git a/src/plugins/priority/multifactor/Makefile.am b/src/plugins/priority/multifactor/Makefile.am
index 8ccb9eba4d4..bc6b51eab04 100644
--- a/src/plugins/priority/multifactor/Makefile.am
+++ b/src/plugins/priority/multifactor/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = priority_multifactor.la
 
diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in
index 1229e485a2b..cba62953bfa 100644
--- a/src/plugins/priority/multifactor/Makefile.in
+++ b/src/plugins/priority/multifactor/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = priority_multifactor.la
 
 # Null priority logging plugin.
diff --git a/src/plugins/proctrack/aix/Makefile.am b/src/plugins/proctrack/aix/Makefile.am
index 3e820cf40fe..722f4f5ca29 100644
--- a/src/plugins/proctrack/aix/Makefile.am
+++ b/src/plugins/proctrack/aix/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -Wl,-bI:$(PROCTRACKDIR)/proctrackext.exp\
 		-module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_aix.la
 
diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in
index bb6746b427b..3ab025e2d03 100644
--- a/src/plugins/proctrack/aix/Makefile.in
+++ b/src/plugins/proctrack/aix/Makefile.in
@@ -395,7 +395,7 @@ AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -Wl,-bI:$(PROCTRACKDIR)/proctrackext.exp\
 		-module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = proctrack_aix.la
 
 # AIX process tracking  kernel extension plugin.
diff --git a/src/plugins/proctrack/cgroup/Makefile.am b/src/plugins/proctrack/cgroup/Makefile.am
index 7012a6c443e..3a2573066ba 100644
--- a/src/plugins/proctrack/cgroup/Makefile.am
+++ b/src/plugins/proctrack/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_cgroup.la
 
diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in
index d4de0fbd798..d40e6dfc123 100644
--- a/src/plugins/proctrack/cgroup/Makefile.in
+++ b/src/plugins/proctrack/cgroup/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = proctrack_cgroup.la
 
 # Process group ID process tracking plugin.
diff --git a/src/plugins/proctrack/linuxproc/Makefile.am b/src/plugins/proctrack/linuxproc/Makefile.am
index 6e350d6c91f..94d9156961e 100644
--- a/src/plugins/proctrack/linuxproc/Makefile.am
+++ b/src/plugins/proctrack/linuxproc/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_linuxproc.la
 
diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in
index 81b222c314b..246a3ffa7b2 100644
--- a/src/plugins/proctrack/linuxproc/Makefile.in
+++ b/src/plugins/proctrack/linuxproc/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = proctrack_linuxproc.la
 
 # Process group ID process tracking  plugin.
diff --git a/src/plugins/proctrack/lua/Makefile.am b/src/plugins/proctrack/lua/Makefile.am
index c9fd3d0ba3e..5573fd72bd7 100644
--- a/src/plugins/proctrack/lua/Makefile.am
+++ b/src/plugins/proctrack/lua/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+AM_CFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in
index 3ec2c23fec6..fe7a774b8bc 100644
--- a/src/plugins/proctrack/lua/Makefile.in
+++ b/src/plugins/proctrack/lua/Makefile.in
@@ -392,7 +392,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
+AM_CFLAGS = -DDEFAULT_SCRIPT_DIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir) -I$(top_srcdir)/src/common $(lua_CFLAGS)
 
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
diff --git a/src/plugins/proctrack/pgid/Makefile.am b/src/plugins/proctrack/pgid/Makefile.am
index 49d9a927778..7e447d54cae 100644
--- a/src/plugins/proctrack/pgid/Makefile.am
+++ b/src/plugins/proctrack/pgid/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_pgid.la
 
diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in
index f711761954c..d66752c03a3 100644
--- a/src/plugins/proctrack/pgid/Makefile.in
+++ b/src/plugins/proctrack/pgid/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = proctrack_pgid.la
 
 # Process group ID process tracking  plugin.
diff --git a/src/plugins/proctrack/sgi_job/Makefile.am b/src/plugins/proctrack/sgi_job/Makefile.am
index 5c04974b862..dd06ab16a29 100644
--- a/src/plugins/proctrack/sgi_job/Makefile.am
+++ b/src/plugins/proctrack/sgi_job/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = proctrack_sgi_job.la
 
diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in
index 956a456f9cb..7e312800594 100644
--- a/src/plugins/proctrack/sgi_job/Makefile.in
+++ b/src/plugins/proctrack/sgi_job/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = - -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = proctrack_sgi_job.la
 proctrack_sgi_job_la_SOURCES = proctrack_sgi_job.c
 proctrack_sgi_job_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(OTHER_FLAGS)
diff --git a/src/plugins/sched/backfill/Makefile.am b/src/plugins/sched/backfill/Makefile.am
index baa9d6f7237..f6bc6f58e81 100644
--- a/src/plugins/sched/backfill/Makefile.am
+++ b/src/plugins/sched/backfill/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_backfill.la
 
diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in
index 3c644f0d062..4bffdafaaca 100644
--- a/src/plugins/sched/backfill/Makefile.in
+++ b/src/plugins/sched/backfill/Makefile.in
@@ -394,7 +394,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = sched_backfill.la
 sched_backfill_la_SOURCES = backfill_wrapper.c	\
 			backfill.c	\
diff --git a/src/plugins/sched/builtin/Makefile.am b/src/plugins/sched/builtin/Makefile.am
index 1f22326c81a..3233c1cd8eb 100644
--- a/src/plugins/sched/builtin/Makefile.am
+++ b/src/plugins/sched/builtin/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_builtin.la
 
diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in
index 5b32e7a7361..d1ae2f170f2 100644
--- a/src/plugins/sched/builtin/Makefile.in
+++ b/src/plugins/sched/builtin/Makefile.in
@@ -394,7 +394,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = sched_builtin.la
 sched_builtin_la_SOURCES = \
 			builtin_wrapper.c \
diff --git a/src/plugins/sched/hold/Makefile.am b/src/plugins/sched/hold/Makefile.am
index fcdb0e23f3a..64e91a32249 100644
--- a/src/plugins/sched/hold/Makefile.am
+++ b/src/plugins/sched/hold/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_hold.la
 
diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in
index 9acd2fda50e..ae7eeaf4d9c 100644
--- a/src/plugins/sched/hold/Makefile.in
+++ b/src/plugins/sched/hold/Makefile.in
@@ -394,7 +394,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = sched_hold.la
 sched_hold_la_SOURCES = hold_wrapper.c
 sched_hold_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/sched/wiki/Makefile.am b/src/plugins/sched/wiki/Makefile.am
index 87653145e19..d376baa75b1 100644
--- a/src/plugins/sched/wiki/Makefile.am
+++ b/src/plugins/sched/wiki/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_wiki.la
 
diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in
index 5e882464b8d..27945adf488 100644
--- a/src/plugins/sched/wiki/Makefile.in
+++ b/src/plugins/sched/wiki/Makefile.in
@@ -396,7 +396,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = sched_wiki.la
 sched_wiki_la_SOURCES = \
 	cancel_job.c	\
diff --git a/src/plugins/sched/wiki2/Makefile.am b/src/plugins/sched/wiki2/Makefile.am
index 86c81b5fafe..8fff343e3e4 100644
--- a/src/plugins/sched/wiki2/Makefile.am
+++ b/src/plugins/sched/wiki2/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = sched_wiki2.la
 
diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in
index b0eb33be1b5..0ac3c5c7f49 100644
--- a/src/plugins/sched/wiki2/Makefile.in
+++ b/src/plugins/sched/wiki2/Makefile.in
@@ -399,7 +399,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = sched_wiki2.la
 sched_wiki2_la_SOURCES = \
 	cancel_job.c	\
diff --git a/src/plugins/select/bluegene/Makefile.am b/src/plugins/select/bluegene/Makefile.am
index 42ca88b6c57..cf02dc4ba0c 100644
--- a/src/plugins/select/bluegene/Makefile.am
+++ b/src/plugins/select/bluegene/Makefile.am
@@ -5,7 +5,7 @@ CLEANFILES = core.*
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic -lm
 
-AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 pkglib_LTLIBRARIES = select_bluegene.la
 
diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in
index 617fd82eb6a..9807bafe0f9 100644
--- a/src/plugins/select/bluegene/Makefile.in
+++ b/src/plugins/select/bluegene/Makefile.in
@@ -558,7 +558,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic -lm
-AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 pkglib_LTLIBRARIES = select_bluegene.la $(am__append_2) \
 	$(am__append_3) $(am__append_5)
 noinst_LTLIBRARIES = libba_common.la libconfigure_api.la
diff --git a/src/plugins/select/bluegene/ba/Makefile.am b/src/plugins/select/bluegene/ba/Makefile.am
index bf42e1e051b..f34a71eebd7 100644
--- a/src/plugins/select/bluegene/ba/Makefile.am
+++ b/src/plugins/select/bluegene/ba/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in
index 47c1b56e7b1..582664222a3 100644
--- a/src/plugins/select/bluegene/ba/Makefile.in
+++ b/src/plugins/select/bluegene/ba/Makefile.in
@@ -377,7 +377,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 noinst_LTLIBRARIES = libblock_allocator.la
diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.am b/src/plugins/select/bluegene/ba_bgq/Makefile.am
index 43473ec235d..52b32dd59a9 100644
--- a/src/plugins/select/bluegene/ba_bgq/Makefile.am
+++ b/src/plugins/select/bluegene/ba_bgq/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in
index 5fffee0ea0c..ee165238f4b 100644
--- a/src/plugins/select/bluegene/ba_bgq/Makefile.in
+++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in
@@ -387,7 +387,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 noinst_LTLIBRARIES = libblock_allocator.la
diff --git a/src/plugins/select/bluegene/bl/Makefile.am b/src/plugins/select/bluegene/bl/Makefile.am
index b65c8b4616b..9aa7cc305b0 100644
--- a/src/plugins/select/bluegene/bl/Makefile.am
+++ b/src/plugins/select/bluegene/bl/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in
index 97f12ad9dd9..f459eccc119 100644
--- a/src/plugins/select/bluegene/bl/Makefile.in
+++ b/src/plugins/select/bluegene/bl/Makefile.in
@@ -366,7 +366,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 noinst_LTLIBRARIES = libbridge_linker.la
diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.am b/src/plugins/select/bluegene/bl_bgq/Makefile.am
index 346bd147c86..6cb19946627 100644
--- a/src/plugins/select/bluegene/bl_bgq/Makefile.am
+++ b/src/plugins/select/bluegene/bl_bgq/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 
diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in
index 043864de700..3f463299aac 100644
--- a/src/plugins/select/bluegene/bl_bgq/Makefile.in
+++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in
@@ -375,7 +375,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # making a .la
 noinst_LTLIBRARIES = libbridge_linker.la
diff --git a/src/plugins/select/bluegene/sfree/Makefile.am b/src/plugins/select/bluegene/sfree/Makefile.am
index 5bb2dc4572c..607d7e7d7bd 100644
--- a/src/plugins/select/bluegene/sfree/Makefile.am
+++ b/src/plugins/select/bluegene/sfree/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 
 sbin_PROGRAMS = sfree
 
diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in
index 9c61fe7e0ea..5ab066a3d3d 100644
--- a/src/plugins/select/bluegene/sfree/Makefile.in
+++ b/src/plugins/select/bluegene/sfree/Makefile.in
@@ -369,7 +369,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir)  -I$(top_srcdir)/src/common $(BG_INCLUDES)
 sfree_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 sfree_SOURCES = sfree.c sfree.h opts.c
 sfree_LDFLAGS = -export-dynamic -lm $(CMD_LDFLAGS) \
diff --git a/src/plugins/select/cons_res/Makefile.am b/src/plugins/select/cons_res/Makefile.am
index 06a86eb545d..140e0f2d5b4 100644
--- a/src/plugins/select/cons_res/Makefile.am
+++ b/src/plugins/select/cons_res/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_cons_res.la
 
diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in
index 14f1e599252..eb39b9c1767 100644
--- a/src/plugins/select/cons_res/Makefile.in
+++ b/src/plugins/select/cons_res/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = select_cons_res.la
 
 # Consumable resources node selection plugin.
diff --git a/src/plugins/select/cray/Makefile.am b/src/plugins/select/cray/Makefile.am
index db5a9d8cdd8..d62c124f207 100644
--- a/src/plugins/select/cray/Makefile.am
+++ b/src/plugins/select/cray/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
 
 pkglib_LTLIBRARIES = select_cray.la
 
diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in
index e26b9423874..4cdd628443e 100644
--- a/src/plugins/select/cray/Makefile.in
+++ b/src/plugins/select/cray/Makefile.in
@@ -440,7 +440,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I.
 pkglib_LTLIBRARIES = select_cray.la
 
 # Cray node selection plugin.
diff --git a/src/plugins/select/cray/libalps/Makefile.am b/src/plugins/select/cray/libalps/Makefile.am
index 69d40f1f2c2..923c9d2d2ed 100644
--- a/src/plugins/select/cray/libalps/Makefile.am
+++ b/src/plugins/select/cray/libalps/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 
 noinst_LTLIBRARIES = libalps.la
 
diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in
index 9ea4c8aa70c..21d1302e74c 100644
--- a/src/plugins/select/cray/libalps/Makefile.in
+++ b/src/plugins/select/cray/libalps/Makefile.in
@@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 noinst_LTLIBRARIES = libalps.la
 libalps_la_SOURCES = \
 	../basil_alps.h		\
diff --git a/src/plugins/select/cray/libemulate/Makefile.am b/src/plugins/select/cray/libemulate/Makefile.am
index ddcd3cfd333..682f4e8899d 100644
--- a/src/plugins/select/cray/libemulate/Makefile.am
+++ b/src/plugins/select/cray/libemulate/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 
 noinst_LTLIBRARIES = libalps.la
 
diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in
index 153c7879ddf..8f053596c46 100644
--- a/src/plugins/select/cray/libemulate/Makefile.in
+++ b/src/plugins/select/cray/libemulate/Makefile.in
@@ -366,7 +366,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common -I. -I../
 noinst_LTLIBRARIES = libalps.la
 libalps_la_SOURCES = \
 	../basil_alps.h		\
diff --git a/src/plugins/select/linear/Makefile.am b/src/plugins/select/linear/Makefile.am
index 644b0b1eefc..92f4bf6e483 100644
--- a/src/plugins/select/linear/Makefile.am
+++ b/src/plugins/select/linear/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_linear.la
 
diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in
index 8582734abd0..1a6c18f3171 100644
--- a/src/plugins/select/linear/Makefile.in
+++ b/src/plugins/select/linear/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = select_linear.la
 
 # Linear node selection plugin.
diff --git a/src/plugins/select/serial/Makefile.am b/src/plugins/select/serial/Makefile.am
index c43d6d3b105..a838521e831 100644
--- a/src/plugins/select/serial/Makefile.am
+++ b/src/plugins/select/serial/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = select_serial.la
 
diff --git a/src/plugins/select/serial/Makefile.in b/src/plugins/select/serial/Makefile.in
index d10fdd76908..8af34757f69 100644
--- a/src/plugins/select/serial/Makefile.in
+++ b/src/plugins/select/serial/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = select_serial.la
 
 # serial job resource selection plugin.
diff --git a/src/plugins/slurmctld/dynalloc/Makefile.am b/src/plugins/slurmctld/dynalloc/Makefile.am
index 691891b1684..3165259dae3 100644
--- a/src/plugins/slurmctld/dynalloc/Makefile.am
+++ b/src/plugins/slurmctld/dynalloc/Makefile.am
@@ -6,7 +6,7 @@ AM_CXXFLAGS = -fexceptions
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 AS_DYNALLOC_SOURCES = \
 	allocate.c	\
diff --git a/src/plugins/slurmctld/dynalloc/Makefile.in b/src/plugins/slurmctld/dynalloc/Makefile.in
index 6edeae02273..5e5bc17ab85 100644
--- a/src/plugins/slurmctld/dynalloc/Makefile.in
+++ b/src/plugins/slurmctld/dynalloc/Makefile.in
@@ -409,7 +409,7 @@ top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 AM_CXXFLAGS = -fexceptions
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 AS_DYNALLOC_SOURCES = \
 	allocate.c	\
 	allocate.h	\
diff --git a/src/plugins/switch/none/Makefile.am b/src/plugins/switch/none/Makefile.am
index 9dc0e293f8d..beb2bdd4275 100644
--- a/src/plugins/switch/none/Makefile.am
+++ b/src/plugins/switch/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = switch_none.la
 
diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in
index c88cff2619b..88576bc5a3d 100644
--- a/src/plugins/switch/none/Makefile.in
+++ b/src/plugins/switch/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = switch_none.la
 
 # Null switch plugin.
diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am
index af9b810c8a6..37ed96788c5 100644
--- a/src/plugins/switch/nrt/Makefile.am
+++ b/src/plugins/switch/nrt/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
 
 
 SWITCH_NRT_LA_SOURCES =		\
diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in
index 8e6bdfd2bda..3d2ffc49b86 100644
--- a/src/plugins/switch/nrt/Makefile.in
+++ b/src/plugins/switch/nrt/Makefile.in
@@ -438,7 +438,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS)
 SWITCH_NRT_LA_SOURCES = \
 	nrt.c			\
 	nrt_keys.h		\
diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am
index 353289d26b1..2b856e7c15f 100644
--- a/src/plugins/switch/nrt/libpermapi/Makefile.am
+++ b/src/plugins/switch/nrt/libpermapi/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common \
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common \
 	   -I$(top_srcdir)/src/srun/libsrun $(NRT_CPPFLAGS)
 
 # making a .la
diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in
index 6a1bf18c7fc..be77adbd062 100644
--- a/src/plugins/switch/nrt/libpermapi/Makefile.in
+++ b/src/plugins/switch/nrt/libpermapi/Makefile.in
@@ -395,7 +395,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common \
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common \
 	   -I$(top_srcdir)/src/srun/libsrun $(NRT_CPPFLAGS)
 
 
diff --git a/src/plugins/task/affinity/Makefile.am b/src/plugins/task/affinity/Makefile.am
index 1a60237a56d..5c833612479 100644
--- a/src/plugins/task/affinity/Makefile.am
+++ b/src/plugins/task/affinity/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 if HAVE_SCHED_SETAFFINITY
 pkglib_LTLIBRARIES = task_affinity.la
diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in
index 1cfffe06661..4684c3b41e1 100644
--- a/src/plugins/task/affinity/Makefile.in
+++ b/src/plugins/task/affinity/Makefile.in
@@ -405,7 +405,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 @HAVE_SCHED_SETAFFINITY_FALSE@pkglib_LTLIBRARIES = 
 @HAVE_SCHED_SETAFFINITY_TRUE@pkglib_LTLIBRARIES = task_affinity.la
 @HAVE_SCHED_SETAFFINITY_TRUE@task_affinity_la_SOURCES = \
diff --git a/src/plugins/task/cgroup/Makefile.am b/src/plugins/task/cgroup/Makefile.am
index b9937815c9f..ea78d554895 100644
--- a/src/plugins/task/cgroup/Makefile.am
+++ b/src/plugins/task/cgroup/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = task_cgroup.la
 
diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in
index 00ddb90fa9a..08412a553b6 100644
--- a/src/plugins/task/cgroup/Makefile.in
+++ b/src/plugins/task/cgroup/Makefile.in
@@ -396,7 +396,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = task_cgroup.la
 
 # cgroup task plugin.
diff --git a/src/plugins/task/none/Makefile.am b/src/plugins/task/none/Makefile.am
index 5163bf6557b..1bfa2e50ec2 100644
--- a/src/plugins/task/none/Makefile.am
+++ b/src/plugins/task/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = task_none.la
 
diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in
index 682a63fcd9b..fcaabd73a35 100644
--- a/src/plugins/task/none/Makefile.in
+++ b/src/plugins/task/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = task_none.la
 
 # Null task plugin.
diff --git a/src/plugins/topology/3d_torus/Makefile.am b/src/plugins/topology/3d_torus/Makefile.am
index c820d405540..c8d7c473f51 100644
--- a/src/plugins/topology/3d_torus/Makefile.am
+++ b/src/plugins/topology/3d_torus/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_3d_torus.la
 
diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in
index 84d10f8be58..a1c8b5ad48d 100644
--- a/src/plugins/topology/3d_torus/Makefile.in
+++ b/src/plugins/topology/3d_torus/Makefile.in
@@ -394,7 +394,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = topology_3d_torus.la
 
 # 3d_torus topology plugin.
diff --git a/src/plugins/topology/node_rank/Makefile.am b/src/plugins/topology/node_rank/Makefile.am
index 08f9b5829e9..93f11c79b31 100644
--- a/src/plugins/topology/node_rank/Makefile.am
+++ b/src/plugins/topology/node_rank/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_node_rank.la
 
diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in
index c2345d669db..0ead85ebffa 100644
--- a/src/plugins/topology/node_rank/Makefile.in
+++ b/src/plugins/topology/node_rank/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = topology_node_rank.la
 
 # Null topology plugin.
diff --git a/src/plugins/topology/none/Makefile.am b/src/plugins/topology/none/Makefile.am
index fdd40acd8f8..409c3e03aa2 100644
--- a/src/plugins/topology/none/Makefile.am
+++ b/src/plugins/topology/none/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_none.la
 
diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in
index c24a4f80f40..15f29b925ea 100644
--- a/src/plugins/topology/none/Makefile.in
+++ b/src/plugins/topology/none/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = topology_none.la
 
 # Null topology plugin.
diff --git a/src/plugins/topology/tree/Makefile.am b/src/plugins/topology/tree/Makefile.am
index 19d7ec31736..6a3e65eb156 100644
--- a/src/plugins/topology/tree/Makefile.am
+++ b/src/plugins/topology/tree/Makefile.am
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign
 
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 pkglib_LTLIBRARIES = topology_tree.la
 
diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in
index 05848815250..1a5e56c288b 100644
--- a/src/plugins/topology/tree/Makefile.in
+++ b/src/plugins/topology/tree/Makefile.in
@@ -393,7 +393,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 PLUGIN_FLAGS = -module -avoid-version --export-dynamic
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 pkglib_LTLIBRARIES = topology_tree.la
 
 # Null topology plugin.
diff --git a/src/sacct/Makefile.am b/src/sacct/Makefile.am
index d22d76ce36f..acc8a347f5b 100644
--- a/src/sacct/Makefile.am
+++ b/src/sacct/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sacct
 
diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in
index afa9a306822..0d0bae96339 100644
--- a/src/sacct/Makefile.in
+++ b/src/sacct/Makefile.in
@@ -373,7 +373,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sacct_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS)
 sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \
 	$(HWLOC_LDFLAGS) $(HWLOC_LIBS)
diff --git a/src/sacctmgr/Makefile.am b/src/sacctmgr/Makefile.am
index ca694b67454..a07e59a9ade 100644
--- a/src/sacctmgr/Makefile.am
+++ b/src/sacctmgr/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sacctmgr
 
diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in
index 2bafbe4e0d6..76420bd462b 100644
--- a/src/sacctmgr/Makefile.in
+++ b/src/sacctmgr/Makefile.in
@@ -376,7 +376,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sacctmgr_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) \
 	$(READLINE_LIBS)
 
diff --git a/src/salloc/Makefile.am b/src/salloc/Makefile.am
index 3f795540da8..4bcf9c6950c 100644
--- a/src/salloc/Makefile.am
+++ b/src/salloc/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 bin_PROGRAMS = salloc
 
diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in
index 602392e49e8..6fee9294ca0 100644
--- a/src/salloc/Makefile.in
+++ b/src/salloc/Makefile.in
@@ -371,7 +371,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 salloc_SOURCES = salloc.c salloc.h opt.c opt.h
 convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 salloc_LDADD = $(convenience_libs) $(am__append_1)
diff --git a/src/sattach/Makefile.am b/src/sattach/Makefile.am
index 59edc23dd09..53109d762be 100644
--- a/src/sattach/Makefile.am
+++ b/src/sattach/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sattach
 
diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in
index 89f41ca8a46..b9dc226bdee 100644
--- a/src/sattach/Makefile.in
+++ b/src/sattach/Makefile.in
@@ -370,7 +370,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sattach_SOURCES = \
 	attach.c attach.h \
 	opt.c opt.h \
diff --git a/src/sbatch/Makefile.am b/src/sbatch/Makefile.am
index 02bc1109e72..9b5a0315296 100644
--- a/src/sbatch/Makefile.am
+++ b/src/sbatch/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sbatch
 
diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in
index 0737bf3a8f9..fa376daa19f 100644
--- a/src/sbatch/Makefile.in
+++ b/src/sbatch/Makefile.in
@@ -371,7 +371,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sbatch_SOURCES = sbatch.c mult_cluster.c mult_cluster.h opt.c opt.h
 convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 sbatch_LDADD = $(convenience_libs)
diff --git a/src/sbcast/Makefile.am b/src/sbcast/Makefile.am
index f52394f4891..083f2699009 100644
--- a/src/sbcast/Makefile.am
+++ b/src/sbcast/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sbcast
 
 sbcast_LDADD = 	$(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm
diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in
index cc704478548..84563671518 100644
--- a/src/sbcast/Makefile.in
+++ b/src/sbcast/Makefile.in
@@ -372,7 +372,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 sbcast_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm
 noinst_HEADERS = sbcast.h
 sbcast_SOURCES = agent.c sbcast.c opts.c
diff --git a/src/scancel/Makefile.am b/src/scancel/Makefile.am
index e4d6514a893..9ab1f4724b0 100644
--- a/src/scancel/Makefile.am
+++ b/src/scancel/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = scancel
 
diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in
index 15e034432c4..f01fa4c8433 100644
--- a/src/scancel/Makefile.in
+++ b/src/scancel/Makefile.in
@@ -371,7 +371,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 scancel_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 noinst_HEADERS = scancel.h
 scancel_SOURCES = scancel.c opt.c
diff --git a/src/scontrol/Makefile.am b/src/scontrol/Makefile.am
index 22e0132a6b1..8de5924c4bd 100644
--- a/src/scontrol/Makefile.am
+++ b/src/scontrol/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 bin_PROGRAMS = scontrol
 
diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in
index fa77796e8f3..8e5188c8019 100644
--- a/src/scontrol/Makefile.in
+++ b/src/scontrol/Makefile.in
@@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 scontrol_SOURCES = \
 	create_res.c	\
 	info_block.c	\
diff --git a/src/sdiag/Makefile.am b/src/sdiag/Makefile.am
index f9c9726dd45..93702cf02e9 100644
--- a/src/sdiag/Makefile.am
+++ b/src/sdiag/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sdiag
 
 sdiag_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/sdiag/Makefile.in b/src/sdiag/Makefile.in
index 0d6442f3ea0..a0e762214e5 100644
--- a/src/sdiag/Makefile.in
+++ b/src/sdiag/Makefile.in
@@ -369,7 +369,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 sdiag_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 sdiag_SOURCES = sdiag.c opts.c
 sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \
diff --git a/src/sinfo/Makefile.am b/src/sinfo/Makefile.am
index 63ea14ea25e..9a00a5e7b39 100644
--- a/src/sinfo/Makefile.am
+++ b/src/sinfo/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = sinfo
 
 sinfo_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in
index 4bb647275e2..5a43fa4accf 100644
--- a/src/sinfo/Makefile.in
+++ b/src/sinfo/Makefile.in
@@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 sinfo_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 noinst_HEADERS = sinfo.h print.h
 sinfo_SOURCES = sinfo.c opts.c print.c sort.c
diff --git a/src/slurmctld/Makefile.am b/src/slurmctld/Makefile.am
index addd296c5f1..6be0ac4f39c 100644
--- a/src/slurmctld/Makefile.am
+++ b/src/slurmctld/Makefile.am
@@ -4,7 +4,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # noinst_LTLIBRARIES = libslurmctld.la
 # libslurmctld_la_LDFLAGS  = $(LIB_LDFLAGS) -module --export-dynamic
diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in
index df20075d677..b3246933404 100644
--- a/src/slurmctld/Makefile.in
+++ b/src/slurmctld/Makefile.in
@@ -381,7 +381,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 # noinst_LTLIBRARIES = libslurmctld.la
 # libslurmctld_la_LDFLAGS  = $(LIB_LDFLAGS) -module --export-dynamic
diff --git a/src/slurmd/common/Makefile.am b/src/slurmd/common/Makefile.am
index f94e694b7dc..b2f88f2b053 100644
--- a/src/slurmd/common/Makefile.am
+++ b/src/slurmd/common/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # making a .la
 
diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in
index 5eaecbb2c8b..8606031eb63 100644
--- a/src/slurmd/common/Makefile.in
+++ b/src/slurmd/common/Makefile.in
@@ -363,7 +363,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 # making a .la
 noinst_LTLIBRARIES = libslurmd_common.la
diff --git a/src/slurmd/slurmd/Makefile.am b/src/slurmd/slurmd/Makefile.am
index c7c5f332474..c494b187276 100644
--- a/src/slurmd/slurmd/Makefile.am
+++ b/src/slurmd/slurmd/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 
 sbin_PROGRAMS = slurmd
 
-AM_CPPFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\" \
+AM_CFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\" \
 	-I$(top_srcdir) $(HWLOC_CPPFLAGS)
 
 slurmd_LDADD = 					   \
diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in
index 8e66c869977..554fcfd1a26 100644
--- a/src/slurmd/slurmd/Makefile.in
+++ b/src/slurmd/slurmd/Makefile.in
@@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\" \
+AM_CFLAGS = -DLIBSLURM_SO=\"$(libdir)/libslurm.so\" \
 	-I$(top_srcdir) $(HWLOC_CPPFLAGS)
 
 slurmd_LDADD = \
diff --git a/src/slurmd/slurmstepd/Makefile.am b/src/slurmd/slurmstepd/Makefile.am
index fa662cbb53b..3ecdf2b19d8 100644
--- a/src/slurmd/slurmstepd/Makefile.am
+++ b/src/slurmd/slurmstepd/Makefile.am
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
 
 sbin_PROGRAMS = slurmstepd
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 slurmstepd_LDADD = 				   \
 	$(top_builddir)/src/common/libdaemonize.la \
diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in
index 99fa0a934b7..0f3124623b7 100644
--- a/src/slurmd/slurmstepd/Makefile.in
+++ b/src/slurmd/slurmstepd/Makefile.in
@@ -375,7 +375,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 slurmstepd_LDADD = \
 	$(top_builddir)/src/common/libdaemonize.la \
 	$(top_builddir)/src/api/libslurm.o $(DL_LIBS) \
diff --git a/src/slurmdbd/Makefile.am b/src/slurmdbd/Makefile.am
index bfd3ea7bdba..78fc3752218 100644
--- a/src/slurmdbd/Makefile.am
+++ b/src/slurmdbd/Makefile.am
@@ -4,7 +4,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 sbin_PROGRAMS = slurmdbd
 
diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in
index 7276b152771..4480332dc6f 100644
--- a/src/slurmdbd/Makefile.in
+++ b/src/slurmdbd/Makefile.in
@@ -372,7 +372,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 slurmdbd_LDADD = \
 	$(top_builddir)/src/common/libdaemonize.la \
 	$(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/smap/Makefile.am b/src/smap/Makefile.am
index b89c64bb934..08c190c2417 100644
--- a/src/smap/Makefile.am
+++ b/src/smap/Makefile.am
@@ -7,7 +7,7 @@
 AUTOMAKE_OPTIONS = foreign
 
 LIBS=$(NCURSES)
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if BUILD_SMAP
 
diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in
index 7304c6c6c2f..6e9d6213432 100644
--- a/src/smap/Makefile.in
+++ b/src/smap/Makefile.in
@@ -391,7 +391,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 @BUILD_SMAP_TRUE@noinst_HEADERS = smap.h
 @BUILD_SMAP_TRUE@smap_SOURCES = smap.c job_functions.c \
 @BUILD_SMAP_TRUE@	partition_functions.c grid_functions.c \
diff --git a/src/sprio/Makefile.am b/src/sprio/Makefile.am
index 3c55c9df2ee..bb53e84286e 100644
--- a/src/sprio/Makefile.am
+++ b/src/sprio/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sprio
 
diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in
index 402a321c961..9f717302782 100644
--- a/src/sprio/Makefile.in
+++ b/src/sprio/Makefile.in
@@ -372,7 +372,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sprio_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 noinst_HEADERS = sprio.h print.h
 sprio_SOURCES = sprio.c print.c opts.c
diff --git a/src/squeue/Makefile.am b/src/squeue/Makefile.am
index 9a0dfba1337..7dea1928d1a 100644
--- a/src/squeue/Makefile.am
+++ b/src/squeue/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = squeue
 
diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in
index faaa06efb3d..712ee1ce07d 100644
--- a/src/squeue/Makefile.in
+++ b/src/squeue/Makefile.in
@@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 squeue_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 noinst_HEADERS = squeue.h print.h
 squeue_SOURCES = squeue.c print.c opts.c sort.c
diff --git a/src/sreport/Makefile.am b/src/sreport/Makefile.am
index a7de403075d..fd7c73416fe 100644
--- a/src/sreport/Makefile.am
+++ b/src/sreport/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sreport
 
diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in
index 7890b4c2fd4..c0e4811b787 100644
--- a/src/sreport/Makefile.in
+++ b/src/sreport/Makefile.in
@@ -371,7 +371,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sreport_SOURCES = \
 	sreport.c sreport.h \
 	cluster_reports.c cluster_reports.h \
diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am
index 64ed081936a..6d086104190 100644
--- a/src/srun/Makefile.am
+++ b/src/srun/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = libsrun
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 
 bin_PROGRAMS = srun
 
diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in
index 635280b70a0..5e2607f8bd9 100644
--- a/src/srun/Makefile.in
+++ b/src/srun/Makefile.in
@@ -412,7 +412,7 @@ top_srcdir = @top_srcdir@
 SUBDIRS = libsrun
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 convenience_libs = $(top_builddir)/src/srun/libsrun/libsrun.la \
 	$(top_builddir)/src/api/libslurm.o
 
diff --git a/src/srun/libsrun/Makefile.am b/src/srun/libsrun/Makefile.am
index 4011cf4ebb0..95ebd167b6d 100644
--- a/src/srun/libsrun/Makefile.am
+++ b/src/srun/libsrun/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 
 noinst_LTLIBRARIES = libsrun.la
 
diff --git a/src/srun/libsrun/Makefile.in b/src/srun/libsrun/Makefile.in
index a46b02e2ee1..cc37adb2f50 100644
--- a/src/srun/libsrun/Makefile.in
+++ b/src/srun/libsrun/Makefile.in
@@ -367,7 +367,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun
 noinst_LTLIBRARIES = libsrun.la
 libsrun_la_SOURCES = \
 	allocate.c allocate.h \
diff --git a/src/srun_cr/Makefile.am b/src/srun_cr/Makefile.am
index f4e5fd71065..c8c6956ab8f 100644
--- a/src/srun_cr/Makefile.am
+++ b/src/srun_cr/Makefile.am
@@ -5,7 +5,7 @@ CLEANFILES = core.*
 
 if WITH_BLCR
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BLCR_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) $(BLCR_CPPFLAGS)
 
 bin_PROGRAMS = srun_cr
 
diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in
index 3e6f6892d17..ea9ca223411 100644
--- a/src/srun_cr/Makefile.in
+++ b/src/srun_cr/Makefile.in
@@ -375,7 +375,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-@WITH_BLCR_TRUE@AM_CPPFLAGS = -I$(top_srcdir) $(BLCR_CPPFLAGS)
+@WITH_BLCR_TRUE@AM_CFLAGS = -I$(top_srcdir) $(BLCR_CPPFLAGS)
 @WITH_BLCR_TRUE@srun_cr_SOURCES = srun_cr.c
 @WITH_BLCR_TRUE@convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 @WITH_BLCR_TRUE@srun_cr_LDADD = $(convenience_libs) $(BLCR_LIBS)
diff --git a/src/sshare/Makefile.am b/src/sshare/Makefile.am
index 15ab8489bdd..3cc279f6080 100644
--- a/src/sshare/Makefile.am
+++ b/src/sshare/Makefile.am
@@ -3,7 +3,7 @@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sshare
 
diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in
index a3932a53415..3ac6ff6c49b 100644
--- a/src/sshare/Makefile.in
+++ b/src/sshare/Makefile.in
@@ -369,7 +369,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 CLEANFILES = core.*
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sshare_LDADD = \
 	$(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm \
 	$(READLINE_LIBS)
diff --git a/src/sstat/Makefile.am b/src/sstat/Makefile.am
index 9ab534a08f0..782040c3d82 100644
--- a/src/sstat/Makefile.am
+++ b/src/sstat/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 
 bin_PROGRAMS = sstat
 
diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in
index fe09b3bb997..9805202009d 100644
--- a/src/sstat/Makefile.in
+++ b/src/sstat/Makefile.in
@@ -369,7 +369,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 sstat_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 sstat_SOURCES = \
 	options.c	\
diff --git a/src/strigger/Makefile.am b/src/strigger/Makefile.am
index 7871e0bd459..1b05221d5f4 100644
--- a/src/strigger/Makefile.am
+++ b/src/strigger/Makefile.am
@@ -3,7 +3,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 bin_PROGRAMS = strigger
 
 strigger_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in
index e3373d18ac4..539270d5613 100644
--- a/src/strigger/Makefile.in
+++ b/src/strigger/Makefile.in
@@ -372,7 +372,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 strigger_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS)
 noinst_HEADERS = strigger.h
 strigger_SOURCES = strigger.c opts.c
diff --git a/src/sview/Makefile.am b/src/sview/Makefile.am
index 3b36046da60..97036418d8b 100644
--- a/src/sview/Makefile.am
+++ b/src/sview/Makefile.am
@@ -3,7 +3,7 @@
 # Makefile for sview
 
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 
 if BUILD_SVIEW
 
diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in
index fbacf9cdf41..250af556a1c 100644
--- a/src/sview/Makefile.in
+++ b/src/sview/Makefile.in
@@ -397,7 +397,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
+AM_CFLAGS = -I$(top_srcdir) $(BG_INCLUDES)
 @BUILD_SVIEW_TRUE@sview_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS)
 @BUILD_SVIEW_TRUE@noinst_HEADERS = sview.h
 @BUILD_SVIEW_TRUE@sview_SOURCES = sview.c popups.c grid.c part_info.c job_info.c \
diff --git a/testsuite/slurm_unit/api/Makefile.am b/testsuite/slurm_unit/api/Makefile.am
index a46654bb4b1..4958a80cd54 100644
--- a/testsuite/slurm_unit/api/Makefile.am
+++ b/testsuite/slurm_unit/api/Makefile.am
@@ -7,7 +7,7 @@ check_PROGRAMS = $(TESTS)
 TESTS = \
 	api-test 
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 
 LDADD   = $(top_builddir)/src/common/libcommon.la \
 	  $(top_builddir)/src/api/libslurm.la
diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in
index b1449b90f8f..87c49d29a19 100644
--- a/testsuite/slurm_unit/api/Makefile.in
+++ b/testsuite/slurm_unit/api/Makefile.in
@@ -403,7 +403,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = manual
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/common
 LDADD = $(top_builddir)/src/common/libcommon.la \
 	  $(top_builddir)/src/api/libslurm.la
 
diff --git a/testsuite/slurm_unit/api/manual/Makefile.am b/testsuite/slurm_unit/api/manual/Makefile.am
index 5b7a878630b..3b00279c88d 100644
--- a/testsuite/slurm_unit/api/manual/Makefile.am
+++ b/testsuite/slurm_unit/api/manual/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS =        -I$(top_srcdir)
+AM_CFLAGS =        -I$(top_srcdir)
 LDADD    =        $(top_builddir)/src/api/libslurm.la
 check_PROGRAMS = \
 	cancel-tst \
diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in
index a98f7665e40..aeeece3f3df 100644
--- a/testsuite/slurm_unit/api/manual/Makefile.in
+++ b/testsuite/slurm_unit/api/manual/Makefile.in
@@ -394,7 +394,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = -I$(top_srcdir)
 LDADD = $(top_builddir)/src/api/libslurm.la
 all: all-am
 
diff --git a/testsuite/slurm_unit/common/Makefile.am b/testsuite/slurm_unit/common/Makefile.am
index 875e53b1bbb..6c79b050d68 100644
--- a/testsuite/slurm_unit/common/Makefile.am
+++ b/testsuite/slurm_unit/common/Makefile.am
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 
-AM_CPPFLAGS = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
 LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) $(HWLOC_LIBS)
 
 check_PROGRAMS = \
diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in
index 36cc51d1ca9..1662d0ca8c3 100644
--- a/testsuite/slurm_unit/common/Makefile.in
+++ b/testsuite/slurm_unit/common/Makefile.in
@@ -396,7 +396,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
+AM_CFLAGS = -I$(top_srcdir) $(HWLOC_CPPFLAGS)
 LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) $(HWLOC_LIBS)
 @HAVE_CHECK_TRUE@MYCFLAGS = @CHECK_CFLAGS@ -Wall -ansi -pedantic \
 @HAVE_CHECK_TRUE@	-std=c99 -D_ISO99_SOURCE \
-- 
GitLab