Why can't the configure file read parameters directly from a configuration file? it has to be read from the command line.

when working in linux, software is often compiled, and configure is often used with a lot of parameters behind it. It is difficult to remember and easy to type wrong

.

Why can"t you do that?

  • put a configure.conf file in the current directory, and when you run. / configure, just read the configuration in this file directly, and it feels more elegant
  • .
  • configure.conf can be configured in the following format:
optA = Off -sharp default Off 
optB = 1 -sharp default 1
...
-sharpextraOpt
myOptA = ...
myOptB = ...
Nov.22,2021

configure itself is used to configure the compilation environment. Do you find it strange / funny to configure configure with a configuration file?

in fact, configure parameters are generally switches, and -h Metropolis has detailed parameters; in addition, if your shell enables configure completion, it is also very convenient to enter.

in addition, if you usually only use certain fixed parameters, you can write a script like @ Yujiaao (this is something that most software publishers will not write, after all, your needs are probably different from those of others), or use the history function of shell to quickly call history commands

.

the effect of writing a script is the same

mybuild.sh

-sharp!/bin/bash
./configure --with-ssl=true --with-mysql=true  \
 --with-more=options
Menu