#!/bin/sh
set -C -e -u

# Tell dh-autoreconf where to search, instead of ./ or -Dsrc/.

# libiberty/binutils2.37 fails with autoreconf/2.69 (worked with binutils2.35.2)
# When aclocal rewrites aclocal.m4, it fails to write the m4_include lines.
# Especially, config/gcc-plugin.m4 should define the GCC_PLUGIN_OPTION
# macro, which is not expanded in configure.ac, resulting in a shell
# syntax error in ./configure.

# Exclude zlib, which fails (binutils/2.35.2 autoconf/2.71).
# It is ignored in favor of the Debian package anyway.

# Exclude etc, which contains etc/configure but not its source
# (since 2.38-1).

# gprofng/libcollector: #1013590 with 2.38.50.20220622-1
# libtoolize: error: AC_CONFIG_MACRO_DIRS([../../config]) conflicts with ACLOCAL_AMFLAGS=-I ..

echo src

dirname src/*/configure | grep -v -e zlib -e libiberty -e etc -e gprofng
