What is the best way in FreeBSD to compile programm from ports if I need some custom configure arguments which is not present in default make config window? For example I want compile php with --enable-intl flag
You can try
make configure CONFIGURE_ARGS=--enable-intl
but i'm not sure if it will work. If not, edit /usr/ports/lang/php5/Makefile file and add --enable-intl to CONFIGURE_ARGS there. After that do not forget to make clean.
The proper way in this case is to install the extension: /usr/ports/devel/pecl-intl.
Generally, if you want a configure option that it not in the port, the best way is to submit a patch for the port Makefile that includes it as an option. That way you don't have to worry about re-applying the patch after every ports tree update, and other people can benefit from it as well.
Related
ALL,
I want to try and add an option to my configure script in my project.
For an example I'm looking at the library I'm using for development - wxWidgets.
wxWidgets have their options set and parsed inside configure.in file.
My project doesn't have this file instead it has configure.ac file which AFAIU, I should modify.
And then it just a matter of using proper syntax for parsing the arguments, which I can pick up from the sample.
Is this correct?
My project generates configure and Makefile by Anjuta.
TIA!!
configure.in is an old name for the primary input file to Autoconf. The preferred name for the same file is now configure.ac. You do not need or want both. Whichever you have, yes, is the one you would want to modify to add arguments to the generated configure script.
The Autoconf macros you would want to use are AC_ARG_WITH for a --with-foo argument or AC_ARG_ENABLE for an --enable-foo argument.
Of course, adding the argument is the easy part. For it to be useful, you will need also to write the code that gives the option its desired effect. Perhaps the example code you are looking at will be a sufficient resource for that, but I am skeptical. At least, this is probably not a cut & paste kind of situation.
I'am trying to use privexec program in Ubuntu but according to http://www.onarlioglu.com/privexec/ site, they say that "Don't forget to enable ecryptfs and overlayfs support." at the 2. step of installation. I can't find the way to accomplish this job. Can you direct me to solve it?
Thank you :)
Linux kernel configuration with
make menuconfig
provides UI mechanism for search configuration options.
Just press key / and input part of the option's name, e.g. "ecrypt" (search is case-insensitive).
Resulted list will enumerate options, contained searched string. For each option its description will be shown. Also it will give place in configuration hierarchy, where option can be set.
Option which enable particular filesystem support is usually named as <fs-name>_FS, where fs-name is name of the filesystem in uppercase.
Suppose that I have multiple libraries that I can build with cmake or with configure scripts, there is a tool that can help me with building this libraries such as I can easily manage the rebuilding of this libraries with few modifications like changing compiler's flags ?
I would like to run a sort of automated process a see the feedback about each build + some freedom about building options.
There is a tool like this one beside a conveniently created bash script ?
Make seems like the best tool to use here, but bash script would also work. You could use a makefile that calls the other makefiles with -f (or switch to the directory with -C ). Also, you could handle the flags and such within a single makefile with judicious use of variables, targets and recipes. Realize you can set make variables (and therefore flags) from the command line. That's about the most I can help without knowing more specifics of your situation. Good luck!
I need to use "configure --prefix" in order to "make install" in a particular location. Only a makefile is provided, not a configure file. I have never used autoconf or created a configure script myself. I found a guide here, but got lost at the 5th step involving target binaries etc. Is there any way to make install in the location I need it to be in without creating a configure file. If not, is there any easy way (or a simple guide/tutorial) to make a configure file?
Your question is not very clear to me. Are you trying to create a configure for a package you authored, or are you trying to install some (unnamed) package that does not follow the GNU Build System conventions? I'm assuming the latter.
If the package you are trying to install does not come with a configure file, there is no point in trying to run ./configure, and I would advice against building one unless you are very familiar with that package (and in that case you would know how to install it).
Without knowing what package it is, I would suggest the following course of actions:
Search this package's README files or web pages for instructions about installation.
Look into the Makefile. Maybe you will find a simple install rule and all you have to do is edit that rule or some variable to point to the desired location. Some package are so simple they don't even come with an installation rule: for instance they maybe build a binary, and you are expected to copy that binary wherever you want by your self.
Contact the author(s) of that package.
I am trying to make a live CD for simplifying chrooting into unbootable Linux systems for users, as many unbootable Linux issues could be fixed with chroot, but many users probably don't understand the concept of chroot.
One of the abilities I want to add is the ability to temporarily import some utilities from the Live CD into the target system, so that they can be used as if they where installed, to do configuration tasks.
The problem is is that I can't seem to work around the apps trying to search for stuff in /usr/share when they are imported. (I already have a hacky workaround for /usr/lib using patchelf...) I would do a union mount on the /usr/share's, but that could confuse some package managers when they see files that should not be there, as the user might need to run a package manager to fix the broken system. (or at least I think it could confuse package managers).
I'm trying to see if I can create a script that will rebuild all packages to use a different build prefix instead of /usr. The script can rebuild packages with apt-get build-dep/apt-get source/debbuild, but it can't change the prefix.
Question: Is there a way to pass an argument to debuild or dpkg-buildpackage to change the build prefix?
Right now it seems I have to take a look at the contents of the source (from apt-get source) for every package and see what files are specifying /usr and figure out a way to change it for every one, but I have a feeling I'm missing something obvious...
Is this possible?
I don't think this is feasible. Why don't you mount in a different location, for example /usr/local? That way, you also eliminate a source for possible conflicts.
Still, some packages are full of hardcoded references to the location for their data files, for example.
I'll throw in a pointer to stow as well, although I imagine it's not really helpful for your scenario.