Hi,

Regarding the recent github discussion about build systems and POSIX:

Just in case nobody else gets around to it, the attached patch changes
the build to be POSIX compliant by using 'command -v' instead of
'which'.

-Alex
diff -upr a/autogen.sh b/autogen.sh
--- a/autogen.sh	Wed Sep 11 20:15:10 2024
+++ b/autogen.sh	Wed Oct  2 10:14:39 2024
@@ -15,7 +15,7 @@
 # Required binaries check
 #          
 check_bin_file(){
-   which $1 > /dev/null 2>&1
+   command -v $1 > /dev/null 2>&1
    if [ $? = 0 ]; then
       return 0
    else
diff -upr a/configure.ac b/configure.ac
--- a/configure.ac	Wed Sep 11 20:15:10 2024
+++ b/configure.ac	Wed Oct  2 10:14:15 2024
@@ -297,18 +297,18 @@ if test "x$enable_png" = "xyes"; then
 
 dnl Check if the user hasn't set the variable $PNG_CONFIG
   if test -z "$PNG_CONFIG"; then
-    PNG_CONFIG=`which libpng16-config`
+    PNG_CONFIG=`command -v libpng16-config`
     if test -z "$PNG_CONFIG"; then
-      PNG_CONFIG=`which libpng14-config`
+      PNG_CONFIG=`command -v libpng14-config`
     fi
     if test -z "$PNG_CONFIG"; then
-      PNG_CONFIG=`which libpng12-config`
+      PNG_CONFIG=`command -v libpng12-config`
     fi
     if test -z "$PNG_CONFIG"; then
-      PNG_CONFIG=`which libpng-config`
+      PNG_CONFIG=`command -v libpng-config`
     fi
     if test -z "$PNG_CONFIG"; then
-      PNG_CONFIG=`which libpng10-config`
+      PNG_CONFIG=`command -v libpng10-config`
     fi
   fi
 
_______________________________________________
Dillo-dev mailing list -- dillo-dev@mailman3.com
To unsubscribe send an email to dillo-dev-le...@mailman3.com

Reply via email to