Download Pkg-config For Mac

Posted on  by admin

From Gerris

  1. Pkg Config Install
  2. Install Pkg Config Mac
  3. Pkg Config Windows
  4. Download Pkg-config For Windows
  5. Pkg Config Download
Jump to: navigation, search
  • 2Mac OS X 10.8 (Mountain Lion) installation with brew
  • 3Mac OS X 10.7 Lion Installation with MacPorts
  • 4Mac OS X 10.6 Snow Leopard (Intel) Installation with 'brew'
  • 7Mac OS X 10.4 (Intel) Installation with fink

No-pkg-config is a bash script that implements the functionality of the standard pkg-config utility. It is intended for users of minimal systems, who want to use pkg-config but do not want to install all the dependencies of the standard implementation.


Mac OS X 10.10 (Yosemite) installation with brew

Gerris installation on Yosemite seems pretty straightforward using brew. Follow exactly the 10.8 procedure, just two warnings

is replaced by


is not available. To have gunplot with X11 I needed

Off-screen rendering has not been tested.

Mac OS X 10.8 (Mountain Lion) installation with brew

Gerris installation on Mountain Lion is pretty straightforward using brew (using a different package manager, e.g. Macports, should not be a problem -- see the Wiki's history).



XCode's installation is mandatory. Since Mac OS X 10.7, XCode can be downloaded from the Mac App Store.
Command line tools
standard command-line tools (C compiler, git...) are provided with XCode as an optional package. To install these tools, go to XCode preferences (keyboard shortcut Cmd-; ) and just check 'Install command-line tools'
Apple no more ships an X11 server as of Mountain Lion. X11 is now provided by the project XQuartz. To install it, go to the XQuartz homepage and download the package. Make sure to restart your session before going further.
Homebrew is a package manager that will make gerris (and dependencies) installation smooth and manageable. To install brew, just enter

on the prompt. Note: on OS 10.9 it is recommended to use:

Where to store gerris?

I strongly suggest to create a dedicated repository, e.g. ~/soft, for storing gerris and related software.



For installed software to be properly localized, various environment variables have to be set accordingly in ~/.bashrc

Note: make sure that the file ~/.profile contains the line

for these changes to be taken into account.

Gerris dependencies

Now that brew is installed, almost every dependency needed by gerris can be installed in just a single command line:

Note that as of October, 26th 2012 the package netpbm is broken, but this wont' affect the gerris installation. Moreover, DO NOT install ftgl to avoid further compilation issues.

Unfortunately, there is no package for startup-notification. But the software can be easily installed.
  1. get the source of the latest version from the homepage of startup-notification
  2. move the source to ~/soft and unpack it. Dive into the newly created folder.
  3. compile the software

GTS, Gerris and Gfsview

We're almost done!First, fetch the tarballs of the latest versions of GTS, Gerris and Gfsview. Put them in ~/soft and untar them.

GTS compilation

From the GTS source directory, do

Gerris compilation

From the Gerris source directory, do

Gfsview compilation

From the Gfsview source directory, do

Off-screen rendering

With the preceding method, you won't have access to off-screen rendering (gfsview-batch). There are tricks to overcome this limitation though.One solution to get a functional gfsview-batch is to get the latest version of GLU. After unpacking the tarball into ~/soft, type from the source directory

and then recompile Gfsview using

(you probably want to make sure that paths beginning with $HOME/soft are read 'before' that beginning with /opt/X11 in your .bashrc)

Note that this trick will deactivate the standard (X11) Gfsview.



If some of these steps do not work for you or you find that corrections to this wiki are warranted, write to the mailing list or edit the wiki, or both.

Mac OS X 10.7 Lion Installation with MacPorts

Gerris installs and works fine on Lion and did install fine on older systems. Look at the Wiki's history for help on other systems.

Installation on Macs is an installation from source, not from packages, so you need to know a little bit of linux, how to use line commands in the Terminal etc...



You need to install the latest version of Xcode.
Command line tools
You need also to install the line command tools. Without this, you do not even have a C compiler. This may be invisible when you run 'configure' for Gerris. Moreover, you may still have the gcc from Macports, but you won't have apple's gcc. You can find the command line tools at
A typical way to install is using MacPorts, and without the line command tools it will not work. See also Brew below.
Getting the sources
You may either download and unpack a source tarball or use darcs. In the latter case you need to install Darcs in order to download the gerris sources.

Pkg Config Install

Updating from older systems:

If you're using gfortran AND if you migrated your old data (from Snow Leopard, Leopard or Tiger), take care to update your gfortran installation. Make sure to untar the package in the root directory otherwise your gfrotran will be in a funny location.
If you had fink previously installed and wish to use MacPorts you should uninstall the fink stuff, remove the /sw library and modify the environment variables accordingly.

Environment variables:

Be careful that the ACLOCAL path is set like:

You should also take care to avoid conflicts with libraries that may have been installed elsewhere. One way to avoid the conflicts is to set the MacPorts library first in the PKG_CONFIG_PATH variable.

The Gerris configure will read this variable and get the right MacPort libraries. There is in fact a whole lot of other environment variables that should be set to use with MacPorts to paths starting with /opt/local, read the MacPorts documentation.

Package installation

The packages must installed as in

You also need to install autoconf and automake. You need to chose the right version: currently, 2.69 for autoconf and 1.12 for automake

Download pkg-config mac os

MPI support

Many Macs are multicore so you can do make -j 4 and cool parallel simulations. To have mpi you need toinstall openmpi using macports and link openmpirun to mpirun and openmpicc to mpicc.

Installing gerris

Follow the steps indicated in installation from source. Download thesource (preferably using darcs), then run autogen, for gts, gerris and gfsview.

There were difficulties in the past with gfsview installation because of conflicts with gtk2 and gtkglext packages, but as of Apr 16, 2011 the MacPorts packages were working fine. See the discussion page for a record of these problems and how they were solved.



If some of these steps do not work for you or you find that corrections to this wiki are warranted, write to the mailing list or edit the wiki, or both.

Mac OS X 10.6 Snow Leopard (Intel) Installation with 'brew'

This is only a recipe (sorry), it works for an out of the box machine (no Fink, no Macports, only XCode has to be present). First install brew and the packages, then gerris from source.


Install 'brew'

Start by the installation of homebrew ( see the exact procedure on the web page, it changes)

Now that brew is installed, we can add packages, such as gnuplot, gawk and other useful packages

Open the hidden file '.bashrc' in your 'home', with 'vi' or emacs or ...

if you use vi, press 'i' to be in insert mode (see -- INSERT-- at the bottom), paste the following

go out the file with 'ESC' and ':wq'then do, to update your path

You have to download 'startup-notification' on the web

Caution: the -0.10 works, the -0.12 don not due to a XCB bug fixed in the -0.10compile and install (put the good User Name)

Installing Gerris from tarball

go to gerris

take all the three tarball in the Download directory, unzip them and start:

Be careful that the ACLOCAL path is set like:

Take gerris on the website then

Install Pkg Config Mac

It works! More difficult, take gfsview then

Now, open the file ''remove everything between 'PKG_CHECK_MODULES(OSMESA,...' line 59 and 'AM_CONDI..' add 'have_osmesa=no'if using vi, erase line with 'dd', and insert 'i' the line

in between.e.g. in this file the lines are now :

go out and save (esc :wq)

Prompt exactly

Pkg Config Windows




X11 on MacBook: you need a three-button mouse or trackpad emulation

You need either to connect a three-button mouse to your Mac or have the middle and right-clickfunctions of a mouse emulated on the trackpad. Go into the X11 application (it can be reached inside your Dock) then under the X11 menu go into 'Preferences' and select 'emulate a three button mouse'.

Then press the 'Command' (cmd) key and move ONE finger on the trackpad while clicking on the trackpadto emulate the right-click on the mouse andmove around the gfs view. Press the 'Command' (cmd) key and move TWO fingers on the trackpad to emulate the center-click on the mouse or the scrolling, to zoom in and out these pretty gfsviewimages ...

Mac OS X 10.5 (Intel) Installation with fink

The instructions below for 10.4 should work but there is an OpenGL bug in Xcode 3.0. Either upgrade to Xcode 3.1 or later, or use the following fix when configuring/compiling gfsview:


Mac OS X 10.4 (Intel) Installation with fink

Below are steps that have worked for at least three people, installing Gerris under Mac OS X 10.4 (Intel).

  1. You will need the Apple development tools installed - this is a free download from
  2. Check that you have Apple's X11 and the X11 SDK installed. They are not installed by default on a new machine (at least as far as I could figure out). If X11 is not installed, in OS X 10.4 you need to reinstall your system from the DVD (See here). Reinstalling the system will not remove your user files. (For comparison, on my system, the versions were X11 1.1.3 - XFree86 4.4.0 .)
  3. Install Fink (
  4. Install various dependencies that Gerris requires.

    Other packages may also be necessary. Look at the error messages during the configuration steps below to see what packages may be missing. Then the best way to resolve the problem may be to install 'fink commander'. Then search for all the packages that have a name beginning with pango, gtk+, atk1 and install all of them. Trial and error should eventually lead you to a full installation of all the necessary packages.

  5. Install darcs (needed to obtain the latest version of Gerris, GTS, and GfsView - the packaged versions available on the web do not work). Darcs is not available in Fink either.
    1. Download the DMG from, and mount it.
    2. From the DMG, Drag GMP.Framework into /Library/Frameworks.
    3. From the DMG, put the 'darcs' executable wherever you wish (e.g. /usr/local/bin).
  6. From a suitable folder, obtain the latest versions of GTS, Gerris, and GfsView.
  7. We will install these in /opt/gerris to keep them isolated from the rest of the system. This requires /opt/gerris/lib/pkgconfig to be added to your PKG_CONFIG_PATH. This directory does not exist yet - it will be created in the next step.
  8. Check your version of automake:

    Currently (November 8, 2007) this installation procedure works with automake 1.6.3 which ison your system by default. Any later version should also work.

  9. Add the gerris directory to your path (so gts-config works properly), also add the fink directory.
  10. Compile and install GTS, Gerris and GfsView.
  11. Test your installation. Beware of end of line characters.
  12. You're done !

Optional tools

If we want to generate MPEG movies using ppm2mpeg we will need ffmpeg which is not available in Fink stable, so we must install it manually.

Download Pkg-config For Windows

  1. Download the latest SVN snapshot from
  2. Unpack and install it.

Pkg Config Download

Retrieved from ''