Building the Courier authentication library

The Courier authentication library will serve our purpose by separating the user authentication from the OS X user administration into a standalone user administration based on a MySQL database. You can find the software and documentation from the Courier authentication library web-site. The version we used is version 0.58.

Compiling and installing is the same procedure as all the previous ones. Extract the source archive in a directory, open a Terminal session, change the directory to the one you extracted the archive in and type in the following commands as a normal user (please note that the configure command will run a long time):

For Intel:

CFLAGS="-arch i386" \
./configure --with-authmysql \
  --without-authpam \
  --with-mysql-libs=/usr/local/mysql/lib/mysql \

For PowerPC

CFLAGS="-arch ppc" \
./configure --with-authmysql \
  --without-authpam \
  --with-mysql-libs=/usr/local/mysql/lib/mysql \

Followed by:


Issue the install command when the compilation has finished:

sudo make install

If you are building a fresh installation run the following command to create new configuration files. Do not run it if you are just upgrading to a new version.

sudo make install-configure

9 Responses to “Building the Courier authentication library”

  1. Paul Says:


    Just tried compiling this on my Intel machine and it fails with:

    Compiling authpam.c
    authpam.c:23:31: error: security/pam_appl.h: No such file or directory

    Taking a second look at the configure instructions i notice the PPC instructions has –without-authpam \ and the Intel one does not. ??

    I assume that it should be in the Intel one as well.

    Richard5: Stupid mistake, it’s corrected on the page.

  2. Paul Says:


    There is a difference in the paths you specify for the –with-mysql-libs argument. I’m pretty sure one of them must be wrong.

    Richard5: Again, same stupid mistake, corrected as well…

  3. Dave Says:

    obviously this is not my day.
    the website is down :-/
    didn’t find any mirrors.

    so i expect i’ll get a cup of tea and wait :-)

  4. Dave Says:

    just found a mirror at:

  5. Marc Hanlon Says:

    Thanks very much for this guide, it was REALLY helpful.

  6. Roger Says:

    Everything has went great up to this point.
    Please help.
    I’m getting this error.

    gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

    I tried removing the extra -arch flags from the Makefile, but that just produced another error about a file being to “fat”.

    I’m at my wits end.

  7. Roger Says:

    Fixed it!!!
    Had to remove the extra arch flags from
    mysql_config file. In order to eliminate the error. I replaced them with -arch i386.

    Hope this helps someone else.

  8. Richard5 Says:

    Thanks for letting us know !

  9. Roger Says:

    It wasn’t that I needed to modify the mysql_config script.

    It was that it was using the one under /usr/bin instead of the one under /usr/local/mysql/bin So once I moved the /usr/bin/mysql* to a backed up directory I had to take a few steps back in the process and compile this one again, now knowing what the true issue was.
    I just happened on this when I tried to connect to mysql and couldn’t.