]> git.armaanb.net Git - opendoas.git/blobdiff - configure
Add basic insult capability
[opendoas.git] / configure
index 1f92f0175d6613e7ba8359a3c17bf14d4e3c4e43..43a76e91f93c41a125f40e95d51f09746ff14283 100755 (executable)
--- a/configure
+++ b/configure
@@ -28,6 +28,8 @@ usage: configure [options]
 
   --with-timestamp       enable timestamp support
 
+  --without-kiss-insults disable kiss insults
+
   --uid-max=NUM          set UID_MAX (default 65535)
   --gid-max=NUM          set GID_MAX (default 65535)
 
@@ -38,6 +40,7 @@ EOF
 
 # defaults
 WITHOUT_TIMESTAMP=yes
+WITHOUT_KISS_INSULTS=""
 UID_MAX=65535
 GID_MAX=65535
 
@@ -60,6 +63,7 @@ for x; do
        --with-shadow) WITHOUT_SHADOW=; WITHOUT_PAM=yes ;;
        --without-pam) WITHOUT_PAM=yes ;;
        --without-shadow) WITHOUT_SHADOW=yes ;;
+       --without-kiss-insults) WITHOUT_KISS_INSULTS=yes ;;
        --with-timestamp) WITHOUT_TIMESTAMP= ;;
        --without-timestamp) WITHOUT_TIMESTAMP=yes ;;
        --uid-max) UID_MAX=$var ;;
@@ -221,6 +225,15 @@ int main(void) {
        return 1
 }
 
+definsults() {
+       printf 'SRCS    += insults.c\n' >>$CONFIG_MK
+       [ "$WITHOUT_KISS_INSULTS" ] && {
+               printf 'Not using KISS insults'
+               return 0
+       }
+}
+
+
 persistmethod() {
        [ -z "$WITHOUT_TIMESTAMP" ] && {
                printf '#define USE_TIMESTAMP\n' >>$CONFIG_H
@@ -549,6 +562,8 @@ else
        exit 1
 fi
 
+insults=$(definsults)
+
 persist=$(persistmethod)
 if [ $? -eq 0 ]; then
        printf 'Using persist method\t\t\t%s.\n' "$persist" >&2