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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48868-4c3c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48868-4c3c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?