AC_PREREQ([2.69]) AC_INIT([hello], [0.1]) AS_VAR_SET([hello_major], [0]) AC_CONFIG_FILES([hello-${hello_major}.pc:hello.pc.in]) AC_OUTPUT
This results in a config.status containing the following line: config_files="hello-0.pc:hello.pc.in" Without arguments, config.status works fine because it uses that line to generate all items listed. If passed the argument hello-0.pc, however, an "invalid argument" error results: config.status: error: invalid argument: `hello-0.pc' >From what I could find, the issue is in the "Handling of arguments" section that appears later in the file: "hello-${hello_major}.pc") CONFIG_FILES="$CONFIG_FILES hello-${hello_major}.pc:hello.pc.in" ;; It seems like the shell variable was expanded properly in the first case for creating the config_files line, but this expansion did not occur when creating the argument-handling section. This is particularly problematic when combined with something like Automake that automatically creates rules to regenerate the output file when the template is modified. This happens both with in-tree and out-of-source builds and can be mitigated using an m4 macro: m4_define([hello_major], [0]) AC_CONFIG_FILES([hello-]hello_major[.pc:hello.pc.in])