Commit 2abad3d27e for frr

commit 2abad3d27eb09063defd36a9c89e1985d4e9081c
Author: David 'equinox' Lamparter <equinox@opensourcerouting.org>
Date:   Wed Oct 14 22:31:12 2026 +0200

    build: `.pc` files belong in the root directory

    This is just the standard pattern / pseudo-policy for pkg-config; `.pc`
    files go into the source / build tree's root directory (otherwise you
    would need to use something like `PKG_CONFIG_PATH=/foo/bar/frr/tools`,
    which looks like you're pointing at the *tools* rather than FRR itself.)

    I've left a symlink to keep the previous thing working.

    Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>

diff --git a/.gitignore b/.gitignore
index 60b4189952..91849a0d56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,8 @@
 /libtool.orig
 /test-driver
 /test-suite.log
+/frr.pc
+/tools/frr.pc

 /Makefile
 /Makefile.in
diff --git a/Makefile.am b/Makefile.am
index 1be5c5de06..16ebfce606 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -237,6 +237,10 @@ rc_SCRIPTS = \
 	# end
 endif

+CLEANFILES += frr.pc tools/frr.pc
+tools_pkgconfigdir = @pkgconfigdir@
+tools_pkgconfig_DATA = frr.pc
+
 EXTRA_DIST += \
 	aclocal.m4 \
 	README.md \
diff --git a/configure.ac b/configure.ac
index 520b5fa2c4..a0ba29c4c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2846,7 +2846,7 @@ AC_CONFIG_FILES([tools/frrinit.sh], [chmod +x tools/frrinit.sh])
 AC_CONFIG_FILES([tools/frrcommon.sh])
 AC_CONFIG_FILES([tools/frr.service])
 AC_CONFIG_FILES([tools/frr@.service])
-AC_CONFIG_FILES([tools/frr.pc])
+AC_CONFIG_FILES([frr.pc], [ln -sf ../frr.pc tools/frr.pc])

 # dnl write out a ccls file with our compile configuration
 # dnl have to add -Wno-unused-function otherwise foobar_cmd_magic causes
diff --git a/tools/frr.pc.in b/frr.pc.in
similarity index 100%
rename from tools/frr.pc.in
rename to frr.pc.in
diff --git a/tools/.gitignore b/tools/.gitignore
index 1db10fa99c..1cc343a11a 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -9,4 +9,3 @@
 /frr.service
 /frr@.service
 /frr-llvm-cg
-/frr.pc
diff --git a/tools/subdir.am b/tools/subdir.am
index db77d86f1c..f55c3b1f16 100644
--- a/tools/subdir.am
+++ b/tools/subdir.am
@@ -30,10 +30,6 @@ sbin_SCRIPTS += \
 	tools/watchfrr.sh \
 	# end

-CLEANFILES += tools/frr.pc
-tools_pkgconfigdir = @pkgconfigdir@
-tools_pkgconfig_DATA = tools/frr.pc
-
 tools_permutations_SOURCES = tools/permutations.c
 tools_permutations_LDADD = lib/libfrr.la