commit:     e844329aa5e5e8a855a0030e061ae849d3585885
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 17 18:26:34 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jan 17 18:26:34 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=e844329a

sandbox: drop the '--run-configure' option

This requires some nasty code in configure.ac, and prevents us from
using a different build system.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 configure.ac  | 10 ----------
 src/options.c | 19 -------------------
 2 files changed, 29 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1129fb6..50a196f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,16 +5,6 @@ AM_SILENT_RULES([yes]) # AM_INIT_AUTOMAKE([silent-rules]) is 
broken atm
 AC_CONFIG_HEADERS([sandboxconfig.h])
 AC_CONFIG_MACRO_DIR([m4])
 
-dnl we want to strip out quote chars and normalize whitespace
-sb_configure_opts=
-for a in ${ac_configure_args} ; do
-       case ${a} in
-               \'*\') a=${a#\'}; a=${a%\'};;
-       esac
-       AS_VAR_APPEND([sb_configure_opts], " $a")
-done
-AC_DEFINE_UNQUOTED([SANDBOX_CONFIGURE_OPTS], ["${sb_configure_opts# }"], 
[Arguments given to ./configure])
-
 AC_MSG_CHECKING([environment state])
 env 1>&AS_MESSAGE_LOG_FD
 AC_MSG_RESULT([ok])

diff --git a/src/options.c b/src/options.c
index 96cf3da..06cb53c 100644
--- a/src/options.c
+++ b/src/options.c
@@ -51,8 +51,6 @@ static void read_config(void)
        }
 }
 
-static const char sb_sonfigure_opts[] = SANDBOX_CONFIGURE_OPTS;
-
 static void show_version(void)
 {
        printf(
@@ -71,8 +69,6 @@ static void show_version(void)
 # define SB_PERSONALITIES "no"
 #endif
                " personalities:  " SB_PERSONALITIES "\n"
-               "\nconfigured with these options:\n%s\n",
-               sb_sonfigure_opts
        );
        exit(0);
 }
@@ -103,7 +99,6 @@ static struct option const long_opts[] = {
        {"bash",          no_argument, NULL, 'c'},
        {"help",          no_argument, NULL, 'h'},
        {"version",       no_argument, NULL, 'V'},
-       {"run-configure", no_argument, NULL, 0x800},
        {NULL,            no_argument, NULL, 0x0}
 };
 static const char * const opts_help[] = {
@@ -130,7 +125,6 @@ static const char * const opts_help[] = {
        "Run command through bash shell",
        "Print this help and exit",
        "Print version and exit",
-       "Run local sandbox configure in same way and exit (developer only)",
        NULL
 };
 
@@ -187,17 +181,6 @@ static void show_usage(int status)
        exit(status);
 }
 
-static void run_configure(int argc, char *argv[])
-{
-       int i;
-       char *cmd;
-       xasprintf(&cmd, "set -x; ./configure %s", sb_sonfigure_opts);
-       /* This doesn't need to be fast, so keep it simple. */
-       for (i = optind; i < argc; ++i)
-               xasprintf(&cmd, "%s %s", cmd, argv[i]);
-       exit(system(cmd));
-}
-
 void parseargs(int argc, char *argv[])
 {
        int i;
@@ -211,8 +194,6 @@ void parseargs(int argc, char *argv[])
                        show_version();
                case 'h':
                        show_usage(0);
-               case 0x800:
-                       run_configure(argc, argv);
                case '?':
                        show_usage(1);
                }

Reply via email to