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.
This commit is contained in:
Dan Nicholson 2010-03-31 14:50:47 -07:00 committed by Tollef Fog Heen
parent e58b5b94c6
commit aa4634eb31
11 changed files with 17 additions and 12 deletions

View file

@ -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

View file

@ -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])

2
main.c
View file

@ -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>

View file

@ -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

8
popt/Makefile.am Normal file
View file

@ -0,0 +1,8 @@
noinst_LTLIBRARIES = libpopt.la
libpopt_la_SOURCES = \
popt.c \
popt.h \
poptconfig.c \
popthelp.c \
poptint.h \
poptparse.c

View file

View file