# MapServer development version



## von_Gaden (Jul 3, 2012)

Hi!

Please excuse me for a bit off-topic post.
I have trouble compiling "by hand" third-party software.
I've used FreeBSD ports for many years (since 2002) and I've never tried to compile anything by downloading source, running configure, make, etc...

Because of some problems with FreeBSD port of MapServer and especially MapScript php module I was advised to compile git-master of this software. Details can be found here:
http://osgeo-org.1560.n6.nabble.com/error-in-php-mapscript-util-c-td4654681.html#a4981959

Now I'm stuck on the very first step - configure. All packages from dependency are already installed by the ports. But it seems the script fails to determine presence of png.h (installed png-1.5.11 from ports)
The message is:

```
configure: error: png.h header not found. install png development package, or reconfigure with --with-png=/path/to/png/prefix
```
If I point prefix or even png.h:

```
configure: error: png.h header not found in /usr/local/include. install png development package, or reconfigure with --with-png=/path/to/png/prefix
```

Since I'm very inexperienced in not using ports I'm not sure if this is some FreeBSD specific or MapServer specific issue. As I can see no one complies about such problems in compilation on other OSes.

Thanks in advance for your advices!


----------



## robbak (Jul 3, 2012)

To start with, do you have png.h in /usr/local/include?


----------



## von_Gaden (Jul 3, 2012)

Yes, it is right there. Plus the same file in /usr/local/include/libpng15.
Configure refuses both locations.


----------



## SirDice (Jul 3, 2012)

Not sure if this is going to work but try running ./configure like so:
`# ./configure --with-png=/usr/local/`


----------



## von_Gaden (Jul 3, 2012)

Thanks a lot! I couldn't guess what should PREFIX be...
I think this problem is solved now. Well, MapServer and especially my pain - mapscript php extension is not compiled yet because some errors but ./configure ran smooth!
Thanks again!


----------

