From f2fe105922fe88d6341c732fb3dfd8ab1b125016 Mon Sep 17 00:00:00 2001 From: Dan Mahoney Date: Sat, 16 May 2026 17:09:24 -0700 Subject: [PATCH] Detect perl path at configure time instead of hardcoding /usr/bin/perl Add AC_PATH_PROG([PERL], [perl], [/usr/bin/perl]) to configure.ac and replace the hardcoded #!/usr/bin/perl shebang in all four report scripts with #!@PERL@ so that systems where perl lives elsewhere (e.g. /usr/local/bin/perl on FreeBSD) get the correct shebang. --- configure.ac | 1 + reports/opendmarc-expire.in | 2 +- reports/opendmarc-import.in | 2 +- reports/opendmarc-params.in | 2 +- reports/opendmarc-reports.in | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index fa1bc2bb..f9d3ff44 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,7 @@ AC_SUBST([LIBOPENDMARC_VERSION_INFO]) AC_PROG_CC AM_PROG_CC_C_O LT_INIT +AC_PATH_PROG([PERL], [perl], [/usr/bin/perl]) PKG_PROG_PKG_CONFIG diff --git a/reports/opendmarc-expire.in b/reports/opendmarc-expire.in index 98b1b802..1da08d5f 100755 --- a/reports/opendmarc-expire.in +++ b/reports/opendmarc-expire.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/@PERL@ # # Copyright (c) 2010-2012, 2014-2016, 2018, The Trusted Domain Project. # All rights reserved. diff --git a/reports/opendmarc-import.in b/reports/opendmarc-import.in index 2c48fd2e..07cffbb9 100755 --- a/reports/opendmarc-import.in +++ b/reports/opendmarc-import.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/@PERL@ # # Copyright (c) 2012, 2014, 2018, The Trusted Domain Project. All rights reserved. # diff --git a/reports/opendmarc-params.in b/reports/opendmarc-params.in index b74bcdf5..8622a99c 100755 --- a/reports/opendmarc-params.in +++ b/reports/opendmarc-params.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/@PERL@ # # Copyright (c) 2012, 2013, The Trusted Domain Project. All rights reserved. # diff --git a/reports/opendmarc-reports.in b/reports/opendmarc-reports.in index 04895396..b643e445 100755 --- a/reports/opendmarc-reports.in +++ b/reports/opendmarc-reports.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/@PERL@ # # Copyright (c) 2012-2016, 2017-2018, The Trusted Domain Project. # All rights reserved.