How do I create a configure script?

后端 未结 3 1022
故里飘歌
故里飘歌 2020-12-04 06:46

This may sound like a very generic question but here it goes.

I have a requirement to create a configure script for my application, the result of this configure woul

相关标签:
3条回答
  • 2020-12-04 07:21

    Sometimes a software product will ship with no configure script. Look for an autogen.sh script. it will probably run:

    aclocal || die "aclocal failed"
    automake --add-missing --force-missing --copy --foreign || die "automake failed"
    autoreconf || die "autoreconf failed"
    
    0 讨论(0)
  • 2020-12-04 07:23

    To create the standard "configure" script you need GNU autoconf. You may need GNU automake and libtool too.

    There are tons of documentation and howtos. Google for something like "autoconf automake howto". The good documentation is in the official manual pages:

    • Autoconf: http://www.gnu.org/software/autoconf/
    • Automake: http://www.gnu.org/software/automake/automake.html
    • Libtool: http://www.gnu.org/software/libtool/libtool.html

    Autoconf will create your configure script starting from the "configure.ac" file. The "Makefile.am" file will instruct automake on how to create your makefile by the configure string. Libtool is needed to simplify libraries handling around your code.

    You can start creating a configure.ac file by hand or you may use the "autoscan" helper that may help you to create something semi-automatic for you.

    Then, when you are ready, this one will do the magic:

    autoreconf -i
    
    0 讨论(0)
  • 2020-12-04 07:40

    there is build flow in linux
    and there is a very good tutorial
    https://thoughtbot.com/blog/the-magic-behind-configure-make-make-install

    0 讨论(0)
提交回复
热议问题