summaryrefslogtreecommitdiff
path: root/pcredemo.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 15:53:09 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 15:53:09 +0000
commit97d8dbe9650dfa099c504531c0f5977849199240 (patch)
tree2af5725d23ecfb9dacafd2ab80078c711b15d419 /pcredemo.c
parent81c92f131bb24a578fcfc398f4144880d1444405 (diff)
downloadpcre-97d8dbe9650dfa099c504531c0f5977849199240.tar.gz
Add comments to pcredemo about compiling by using pkg-config.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@477 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcredemo.c')
-rw-r--r--pcredemo.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/pcredemo.c b/pcredemo.c
index c6ba56e..3ab6525 100644
--- a/pcredemo.c
+++ b/pcredemo.c
@@ -7,14 +7,24 @@ of calling the PCRE regular expression library from a C program. See the
pcresample documentation for a short discussion ("man pcresample" if you have
the PCRE man pages installed).
-In Unix-like environments, compile this program thuswise:
+In Unix-like environments, if PCRE is installed in your standard system
+libraries, you should be able to compile this program using this command:
- gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
- -R/usr/local/lib -lpcre
+gcc -Wall pcredemo.c -lpcre -o pcredemo
+
+If PCRE is not installed in a standard place, it is likely to be installed with
+support for the pkg-config mechanism. If you have pkg-config, you can compile
+this program using this command:
+
+gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
+
+If you do not have pkg-config, you may have to use this:
+
+gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
+ -R/usr/local/lib -lpcre -o pcredemo
Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
-library files for PCRE are installed on your system. You don't need -I and -L
-if PCRE is installed in the standard system libraries. Only some operating
+library files for PCRE are installed on your system. Only some operating
systems (e.g. Solaris) use the -R option.
Building under Windows: