]> git.armaanb.net Git - opendoas.git/commitdiff
Fix configuration
authorArmaan Bhojwani <me@armaanb.net>
Sun, 4 Apr 2021 01:43:28 +0000 (21:43 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 4 Apr 2021 01:50:47 +0000 (21:50 -0400)
configure
insults.c

index 43a76e91f93c41a125f40e95d51f09746ff14283..55dabdfc0dc1cdee7342aaa17d77d9ec42334666 100755 (executable)
--- a/configure
+++ b/configure
@@ -28,7 +28,7 @@ usage: configure [options]
 
   --with-timestamp       enable timestamp support
 
 
   --with-timestamp       enable timestamp support
 
-  --without-kiss-insults disable kiss insults
+  --with-kiss-insults    enable kiss insults
 
   --uid-max=NUM          set UID_MAX (default 65535)
   --gid-max=NUM          set GID_MAX (default 65535)
 
   --uid-max=NUM          set UID_MAX (default 65535)
   --gid-max=NUM          set GID_MAX (default 65535)
@@ -63,7 +63,7 @@ for x; do
        --with-shadow) WITHOUT_SHADOW=; WITHOUT_PAM=yes ;;
        --without-pam) WITHOUT_PAM=yes ;;
        --without-shadow) WITHOUT_SHADOW=yes ;;
        --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-kiss-insults) WITH_KISS_INSULTS=yes ;;
        --with-timestamp) WITHOUT_TIMESTAMP= ;;
        --without-timestamp) WITHOUT_TIMESTAMP=yes ;;
        --uid-max) UID_MAX=$var ;;
        --with-timestamp) WITHOUT_TIMESTAMP= ;;
        --without-timestamp) WITHOUT_TIMESTAMP=yes ;;
        --uid-max) UID_MAX=$var ;;
@@ -227,10 +227,10 @@ int main(void) {
 
 definsults() {
        printf 'SRCS    += insults.c\n' >>$CONFIG_MK
 
 definsults() {
        printf 'SRCS    += insults.c\n' >>$CONFIG_MK
-       [ "$WITHOUT_KISS_INSULTS" ] && {
-               printf 'Not using KISS insults'
-               return 0
+       [ -n "$WITH_KISS_INSULTS" ] && {
+               printf '#define DOAS_INSULTS_KISS\n' >>$CONFIG_H
        }
        }
+       return 0
 }
 
 
 }
 
 
index 4a4939074c69b2ee0effbc0bde6eadc6330ac02e..6c71ea29fc967a43a2bd2ad40d2c74ee1765315d 100644 (file)
--- a/insults.c
+++ b/insults.c
@@ -1,6 +1,8 @@
 #include <stdlib.h>
 #include <time.h>
 
 #include <stdlib.h>
 #include <time.h>
 
+#include "config.h"
+
 char *insults[] = {
 
     /*
 char *insults[] = {
 
     /*
@@ -72,9 +74,7 @@ char *insults[] = {
     "There's nothing wrong with you that an expensive operation can't prolong.",
     "I'm very sorry, but I'm not allowed to argue unless you've paid.",
 
     "There's nothing wrong with you that an expensive operation can't prolong.",
     "I'm very sorry, but I'm not allowed to argue unless you've paid.",
 
-#ifndef DOAS_INSULTS_KISS
-#define DOAS_INSULTS_KISS
-
+#ifdef DOAS_INSULTS_KISS
     /*
      * Insults from the KISS Linux community
      */
     /*
      * Insults from the KISS Linux community
      */