summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-03-31 14:50:47 -0700
committerTollef Fog Heen <tfheen@err.no>2010-05-09 10:22:02 +0200
commitaa4634eb31db5b428f0b6c8527e35c081992dfb5 (patch)
tree40f5bbffb35a953cfca7ec0c620631db1b4cd884
parente58b5b94c6c7efa3854bb0a44fbde3d53e1b7684 (diff)
downloadpkg-config-aa4634eb31db5b428f0b6c8527e35c081992dfb5.tar.gz
Move popt to subdirectory and make a convenience library of it
This keeps a cleaner separation of the pkg-config sources and the imported popt sources.
-rw-r--r--Makefile.am16
-rw-r--r--configure.in1
-rw-r--r--main.c2
-rw-r--r--parse.c2
-rw-r--r--popt/Makefile.am8
-rw-r--r--popt/popt.c (renamed from popt.c)0
-rw-r--r--popt/popt.h (renamed from popt.h)0
-rw-r--r--popt/poptconfig.c (renamed from poptconfig.c)0
-rw-r--r--popt/popthelp.c (renamed from popthelp.c)0
-rw-r--r--popt/poptint.h (renamed from poptint.h)0
-rw-r--r--popt/poptparse.c (renamed from poptparse.c)0
11 files changed, 17 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index b9edccc..7681d2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,9 @@ GLIB_SUBDIR = glib-1.2.10
included_glib_includes = -I./glib-1.2.10
pkg_config_LDADD=glib-1.2.10/libglib.la
endif
-SUBDIRS = $(GLIB_SUBDIR) check
+pkg_config_LDADD += popt/libpopt.la
+popt_includes = -I./popt
+SUBDIRS = $(GLIB_SUBDIR) popt check
m4dir = $(datadir)/aclocal
m4_DATA = pkg.m4
@@ -19,7 +21,8 @@ EXTRA_DIST = $(m4_DATA) $(man_MANS) README.win32
bin_PROGRAMS = pkg-config
AM_CFLAGS=@WARN_CFLAGS@
-INCLUDES=-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" $(included_glib_includes)
+INCLUDES=-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" $(included_glib_includes) \
+ $(popt_includes)
pkg_config_SOURCES= \
pkg.h \
@@ -28,11 +31,4 @@ pkg_config_SOURCES= \
parse.c \
main.c \
findme.c \
- findme.h \
- popt.c \
- popt.h \
- poptconfig.c \
- popthelp.c \
- poptint.h \
- poptparse.c
-
+ findme.h
diff --git a/configure.in b/configure.in
index f7a424c..98712f4 100644
--- a/configure.in
+++ b/configure.in
@@ -141,5 +141,6 @@ AC_CHECK_FUNCS(setresuid setreuid,break)
AC_CHECK_HEADERS([dirent.h unistd.h sys/wait.h malloc.h])
AC_OUTPUT([Makefile
+ popt/Makefile
check/Makefile
check/config.sh])
diff --git a/main.c b/main.c
index dba1729..a144d27 100644
--- a/main.c
+++ b/main.c
@@ -24,7 +24,7 @@
#include "pkg.h"
#include "parse.h"
-#include "popt.h"
+#include <popt.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
diff --git a/parse.c b/parse.c
index 0fc242f..01c7878 100644
--- a/parse.c
+++ b/parse.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#include "popt.h"
+#include <popt.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
diff --git a/popt/Makefile.am b/popt/Makefile.am
new file mode 100644
index 0000000..b11c12a
--- /dev/null
+++ b/popt/Makefile.am
@@ -0,0 +1,8 @@
+noinst_LTLIBRARIES = libpopt.la
+libpopt_la_SOURCES = \
+ popt.c \
+ popt.h \
+ poptconfig.c \
+ popthelp.c \
+ poptint.h \
+ poptparse.c
diff --git a/popt.c b/popt/popt.c
index 7d0e3bb..7d0e3bb 100644
--- a/popt.c
+++ b/popt/popt.c
diff --git a/popt.h b/popt/popt.h
index c217e1b..c217e1b 100644
--- a/popt.h
+++ b/popt/popt.h
diff --git a/poptconfig.c b/popt/poptconfig.c
index 1492dd6..1492dd6 100644
--- a/poptconfig.c
+++ b/popt/poptconfig.c
diff --git a/popthelp.c b/popt/popthelp.c
index 1490c78..1490c78 100644
--- a/popthelp.c
+++ b/popt/popthelp.c
diff --git a/poptint.h b/popt/poptint.h
index 44931d4..44931d4 100644
--- a/poptint.h
+++ b/popt/poptint.h
diff --git a/poptparse.c b/popt/poptparse.c
index 18087fb..18087fb 100644
--- a/poptparse.c
+++ b/popt/poptparse.c