src/main/resources/make/configure.vm

changeset 159
b0344d89ade6
parent 148
3b11e97b618e
child 160
3644d06f60d4
--- a/src/main/resources/make/configure.vm	Wed Nov 12 20:26:42 2025 +0100
+++ b/src/main/resources/make/configure.vm	Thu Nov 13 18:24:22 2025 +0100
@@ -236,10 +236,34 @@
 : ${libexecdir:='${exec_prefix}/libexec'}
 : ${datarootdir:='${prefix}/share'}
 : ${datadir:='${datarootdir}'}
-: ${sysconfdir:='${prefix}/etc'}
 : ${sharedstatedir:='${prefix}/com'}
-: ${localstatedir:='${prefix}/var'}
-: ${runstatedir:='${localstatedir}/run'}
+if [ -z "$sysconfdir" ]; then
+    if [ "$prefix" = '/usr' ]; then
+        sysconfdir='/etc'
+    elif [ "$prefix" = '/opt' ]; then
+        sysconfdir='/etc/opt'
+    else
+        sysconfdir='${prefix}/etc'
+    fi
+fi
+if [ -z "$localstatedir" ]; then
+    if [ "$prefix" = '/usr' ]; then
+        localstatedir='/var'
+    elif [ "$prefix" = '/opt' ]; then
+        localstatedir='/var/opt'
+    else
+        localstatedir='${prefix}/var'
+    fi
+fi
+if [ -z "$runstatedir" ]; then
+    if [ "$prefix" = '/usr' ]; then
+        runstatedir='/var/run'
+    elif [ "$prefix" = '/opt' ]; then
+        runstatedir='/var/run/opt'
+    else
+        runstatedir='${prefix}/var'
+    fi
+fi
 : ${includedir:='${prefix}/include'}
 : ${infodir:='${datarootdir}/info'}
 : ${mandir:='${datarootdir}/man'}

mercurial