build: Remove unused tool for config.h comparison
[obnox/samba/samba-obnox.git] / source3 / script / mkbuildoptions.awk
index 02562cf7b2e85c56b5981919a4190b0bcbb7e9ae..1a32d7af6bfe221d91611a9bfec1d940fb11a6ac 100644 (file)
@@ -21,31 +21,33 @@ BEGIN {
        print "";
        print "#include \"includes.h\"";
        print "#include \"build_env.h\"";
-       print "#include \"dynconfig.h\"";
+       print "#include \"dynconfig/dynconfig.h\"";
        print "";
-       print "static void output(bool screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);";
+       print "static int output(bool screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);";
        print "void build_options(bool screen);";
        print "";
        print "";
        print "/****************************************************************************";
        print "helper function for build_options";
        print "****************************************************************************/";
-       print "static void output(bool screen, const char *format, ...)";
+       print "static int output(bool screen, const char *format, ...)";
        print "{";
-       print "       char *ptr;";
+       print "       char *ptr = NULL;";
+       print "       int ret = 0;";
        print "       va_list ap;";
        print "       ";
        print "       va_start(ap, format);";
-       print "       vasprintf(&ptr,format,ap);";
+       print "       ret = vasprintf(&ptr,format,ap);";
        print "       va_end(ap);";
        print "";
        print "       if (screen) {";
-       print "              d_printf(\"%s\", ptr);";
+       print "              d_printf(\"%s\", ptr ? ptr : \"\");";
        print "       } else {";
-       print "        DEBUG(4,(\"%s\", ptr));";
+       print "        DEBUG(4,(\"%s\", ptr ? ptr : \"\"));";
        print "       }";
        print "       ";
        print "       SAFE_FREE(ptr);";
+       print "       return ret;";
        print "}";
        print "";
        print "/****************************************************************************";
@@ -77,7 +79,6 @@ BEGIN {
 
        print "       output(screen,\"   SBINDIR: %s\\n\", get_dyn_SBINDIR());";
        print "       output(screen,\"   BINDIR: %s\\n\", get_dyn_BINDIR());";
-       print "       output(screen,\"   SWATDIR: %s\\n\", get_dyn_SWATDIR());";
 
        print "       output(screen,\"   CONFIGFILE: %s\\n\", get_dyn_CONFIGFILE());";
        print "       output(screen,\"   LOGFILEBASE: %s\\n\", get_dyn_LOGFILEBASE());";
@@ -88,10 +89,14 @@ BEGIN {
        print "       output(screen,\"   SHLIBEXT: %s\\n\",get_dyn_SHLIBEXT());";
 
        print "       output(screen,\"   LOCKDIR: %s\\n\",get_dyn_LOCKDIR());";
+       print "       output(screen,\"   STATEDIR: %s\\n\",get_dyn_STATEDIR());";
+       print "       output(screen,\"   CACHEDIR: %s\\n\",get_dyn_CACHEDIR());";
        print "       output(screen,\"   PIDDIR: %s\\n\", get_dyn_PIDDIR());";
 
        print "       output(screen,\"   SMB_PASSWD_FILE: %s\\n\",get_dyn_SMB_PASSWD_FILE());";
        print "       output(screen,\"   PRIVATE_DIR: %s\\n\",get_dyn_PRIVATE_DIR());";
+       print "       output(screen,\"   NCALRPCDIR: %s\\n\",get_dyn_NCALRPCDIR());";
+       print "       output(screen,\"   NMBDSOCKETDIR: %s\\n\",get_dyn_NMBDSOCKETDIR());";
        print "";
 
 
@@ -231,7 +236,7 @@ function output(ARRAY, ELEMENTS, TITLE) {
 END {
        ##################################################
        # add code to show various options
-       print "/* Output various other options (as gleaned from include/config.h.in) */";
+       print "/* Output various other options (as gleaned from include/autoconf/config.h.in) */";
        output(sys_ary,     sys_i,     "System Headers");
        output(headers_ary, headers_i, "Headers");
        output(utmp_ary,    utmp_i,    "UTMP Options");