tags:

views:

38

answers:

2

I am developing an application which depends on libpcap and want to know how to write the gnu makefile such that i can check for installation of libpcap on a machine before proceeding with the installation of my application.

A: 

If libpcap supports it, you might try using pkg-config. (I know that libpcap++ supports it, but not sure about libpcap). That said, if you don't already have an established build system, then I suggest you try using CMake which makes this kind of thing and all other aspects of creating a C++ project significantly simpler. For an example or getting started quickly using CMake, see the C++ Project Template.

Michael Aaron Safyan
A: 

If I were going to answer your question properly I'd look at how autoconf checks for the existence of components when I install a package such as GNUPlot (or whatever) and figure it out. I'll leave the work to you though.

High Performance Mark