autoconf

How do I access a user defined variable as defined at the top of a Makefile.am file?

萝らか妹 提交于 2019-12-23 20:14:22
问题 Specifically, I want to do something along the following lines. For a Makefile.am script that defines how a library file should be built, I want to be able to access a common library name throughout. For example, assuming I want the name of the library to be called 'name', I might start with the following variable: LIBNAME = name Then I might have something like this: lib_LTLIBRARIES = lib$(LIBNAME).la But then automake starts to complain when I want to do something like the following: lib$

How to get shell script output into Makefile.am at make time?

无人久伴 提交于 2019-12-23 18:09:22
问题 I am working on an autotools project, and am a newbie to the autotools world. For various reasons, detailed at the bottom for completeness, I have a shell script from which I want to get the output for use in my makefile. I have a situation similar to the following. Autoconf generates a script from an AC_CONFIG_FILES command. e.g. AC_CONFIG_FILES([thescript], [chmod +x thescript]) thescript.in #!/bin/sh # -*- sh -*- # @configure_input@ echo @abs_top_builddir@/bar/foo What I really want to do

Query pkg-config variable through autotools

☆樱花仙子☆ 提交于 2019-12-23 16:18:46
问题 To install a catalog file, I'd like to get the directory for Glade (an UI designer) like so: $ pkg-config --variable=catalogdir gladeui-2.0 /usr/share/glade/catalogs but in a variable inside my Makefile.am. Is there a (portable) way to do this? 回答1: Get this value in configure.ac . I think the latest version of pkg-config is 0.28. Let's assume that 0.25 or above is good enough: configure.ac ... PKG_PROG_PKG_CONFIG([0.25]) # check and set $PKG_CONFIG PKG_CHECK_MODULES([GLADEUI],[gladeui-2.0],

GNU Autotools: install binaries into /bin, /sbin, /usr/bin and /usr/sbin, interactions with --prefix and DESTDIR

♀尐吖头ヾ 提交于 2019-12-23 09:35:05
问题 Most packages using autotools are user-level utilities or at least high-enough level to be completely under /usr, or low enough to be entirely below /usr. I'm writing a package that would need to install some files into /bin, some into /sbin, /usr/bin and /usr/sbin. It's replacing several existing binaries that are traditionally placed under those locations. It also needs to install a PAM module in /lib/security (and obviously /usr/lib/security wouldn't work). Now the problem is: default

How to get absolute path to top build directory in autoconf configure.ac?

爱⌒轻易说出口 提交于 2019-12-23 07:49:41
问题 I am working on a project which requires a subproject which has its own makefile and configure.ac. The subproject is a program which is used to generate source files for the main project. There is an option to disable the building of this project and attempt to use an installed version instead. In either case I create a variable which is used in my Makefile.am containing the path to the program. My question is, When using the local version of the project, how can I get its location for use in

Using the pkg-config macro PKG_CHECK_MODULES failing

强颜欢笑 提交于 2019-12-23 07:27:15
问题 I'm sure this is a fairly simple problem. I have a very simple configure.ac file which I am using to just learn how autoconf & pkg-config work together. The confgure.ac file looks like: AC_PREREQ(2.61) AC_INIT(autoconf_test, 1.0, nowhere@dev.null) PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4) I can then execute autoconf from the command line and it does produce a configure script. However, when I run the configure script, I get the following error: ./configure: line 1618: syntax error

autoconf with -pthread

别等时光非礼了梦想. 提交于 2019-12-23 07:22:59
问题 Greetings. I am trying to create an autoconf configure script that automatically checks for which pthread option to use and, ideally, specifies -pthread when compiling with gcc. It was my hope that AX_PTHREAD would work, but neither seems to work on MacOS 10.6. I'm using AX_PTHREAD from http://www.nongnu.org/autoconf-archive/ax_pthread.html For reasons that I do not understand, it just doesn't use the -pthread option for scripts build on a mac. The problem seems to be that "none" is compiling

configure.in: AM_DISABLE_SHARED doesn't change my Makefile

别来无恙 提交于 2019-12-23 01:10:50
问题 I'm extremely new to using Makefiles and autoconf. I'm using the Camellia image library and trying to statically link my code against their libraries. When I run "make" on the Camellia image library, I get libCamellia.a, .so, .la, and .so.0.0.0 files inside my /usr/local/lib directory. This is the command I use to compile my code with their libraries: gcc -L/usr/local/lib -lCamellia -o myprogram myprogram.c This works fine, but when I try to statically link, this is what I get: gcc -static -L

configuring autoconf to have --with options to customise build

喜你入骨 提交于 2019-12-22 11:28:42
问题 I have a very basic understanding of how autoconf and automake work, gathered from various tutorials. However, as I would like my libraries to be flexible during their builds, they need to have the --with-FEATURE and --without-FEATURE functionality commonly found in other programs. How do I implement this? 回答1: You'll want to use AC_ARG_WITH, for example: AC_ARG_WITH(editres, [ --without-editres do not use editres]) if test "x${with_editres}" != "xno"; then AC_CHECK_LIB(Xmu,

What is the default PHP configuration?

血红的双手。 提交于 2019-12-22 11:04:00
问题 What are the default PHP --configure flags, that are set when doing a standard LAMP install via tasksel? I have to recompile PHP to include process control for my buddy, but I haven't been able to find a list of all flags that come by "default". 回答1: You can do php -i | grep config -i this should return what are the configure used by taskel. Backup your php.ini before you proceed with re-compilation... PS: you might need to download PHP source for compilation 回答2: If you're trying to recreate