开发者

configure.in and adding options

开发者 https://www.devze.com 2023-01-12 02:46 出处:网络
I am trying to add an option to my ./configure script. I need to 开发者_如何学编程add the location to mysql.h but a few methods I have tried and keep getting the error: configure: error: unrecognized

I am trying to add an option to my ./configure script. I need to 开发者_如何学编程add the location to mysql.h but a few methods I have tried and keep getting the error: configure: error: unrecognized option: --mysql=/usr/local/mysql/include/mysql/

How do I add the option to my configure script aswell as to add the header file which is specified.


You're probably looking for AC_ARG_WITH. Something like this:

AC_ARG_WITH([mysql],
        [AS_HELP_STRING([--with-mysql=path : path to mysql headers])],
        [MYSQL_INCLUDE=$withval],
        [])

Then run ./configure --with-mysql=/foo .


Sounds like what you are trying to get your compiler to include a specific include path when it builds. The easiest way to do that is with the CPPFLAGS environment variable, e.g.

% setenv CPPLAGS -I/usr/local/mysql/include/mysql/
% ./configure
% make
% etc...

If you actually need to add a new option to configure you'll need to learn about autoconf and editing configure.in to generate a new configure script.

0

精彩评论

暂无评论...
验证码 换一张
取 消