Permalink
Browse files

Implemented libtools with automake to build shared / static libs. Def…

…ault shared. ./configure --disable-shared to terminate shared lib creation

git-svn-id: svn+ssh://tubbs/svnroot/projects/phpembed/trunk@56891 2c7ba8d8-a2f7-0310-a573-de162e16dcc7
  • Loading branch information...
1 parent 90877f2 commit ee0276bfc4ef4372f82b46bc087efd2b96c414e8 mvaradachari committed Aug 27, 2007
Showing with 17 additions and 19 deletions.
  1. +2 −6 Makefile.am
  2. +6 −9 configure.ac
  3. +4 −2 examples/Makefile.am
  4. +5 −2 src/Makefile.am
View
@@ -6,13 +6,10 @@ SUBDIRS = src examples
EXTRA_DIST = phpembedVersion.h
# Update config if configure.ac or aclocal.m4 changes
-
#$(srcdir)/configure: configure.ac aclocal.m4
# (cd $(srcdir);autoconf)
-
#Makefile: Makefile.in config.status
# ./config.status
-
#config.status: configure
# ./config.status --recheck
@@ -21,7 +18,6 @@ EXTRA_DIST = phpembedVersion.h
# To add to configure.ac
#AC_SUBST(LIBTOOL_DEPS)
-# LIBTOOL_DEPS = @LIBTOOL_DEPS@
+#LIBTOOL_DEPS = @LIBTOOL_DEPS@
#libtool: $(LIBTOOL_DEPS)
-# $(SHELL) ./config.status --recheck
-
+# $(SHELL) ./config.status --recheck
View
@@ -17,12 +17,13 @@ AC_PROG_CXX
AC_PROG_RANLIB(RANLIB, ranlib)
############################################################
-# Turns off shared lib creation. Use --enable-shared=pkg1,pkg2
+# AC_DISABLE_SHARED Turns off shared lib creation. Use --enable-shared=pkg1,pkg2
# This implies all libs are built static except pkg1, pkg2
# --enable-static=pkg3,pkg4 . Implies shared is enabled except for pkg3 and pkg4
-# When developing a package use --disable-shared OR AC_DISABLE_SHARED macro.
-AC_DISABLE_SHARED
+# When developing a package use --disable-shared OR AC_DISABLE_SHARED macro.
+# Current Default shared
+#AC_DISABLE_SHARED
AC_PROG_LIBTOOL
##############################################################
@@ -39,17 +40,15 @@ AC_PATH_PROGS(ANT, ant)
# Checks for header files.
#AC_INCLUDES_DEFAULT
-#AC_HEADER_STDC
-#AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
-
+AC_HEADER_STDC
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
AC_HEADER_STDBOOL
AC_HEADER_TIME
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
-AC_HEADER_TIME
AC_C_VOLATILE
# Checks for library functions.
@@ -215,10 +214,8 @@ echo "CFLAGS = $CFLAGS"
echo "CXXFLAGS = $CXXFLAGS"
echo "CPPFLAGS = $CPPFLAGS"
echo "DEFS = $DEFS"
-echo "cache_file = $cache_file"
echo "CC = $CC"
echo "CXX = $CXX"
echo "VERSION = $VERSION"
echo "PHPEMBED_VERSION_NUMBER= ${PHPEMBED_MAJOR_VERSION}"
echo "PHPEMBED_VERSION_NUMBER= ${PHPEMBED_VERSION_NUMBER}"
-echo "INCLUDES= ${INCLUDES}"
View
@@ -15,9 +15,11 @@ INCLUDES += -I/usr/local/php/include/php/sapi/embed
AM_LDFLAGS = @PHPCONFIGLDFLAGS@ -L/usr/local/php/lib
# List of libraries to link with.
-LDADD = @PHPCONFIGLIBS@ $(top_builddir)/src/libphpembed.a -lphp5
-
+LDADD = @PHPCONFIGLIBS@ $(top_builddir)/src/libphpembed.la -lphp5
bin_PROGRAMS = test usage
test_SOURCES = test.cpp
usage_SOURCES = usage.cpp
+
+# old style without libtools
+#LDADD = @PHPCONFIGLIBS@ $(top_builddir)/src/libphpembed.a -lphp5
View
@@ -11,6 +11,9 @@ INCLUDES += -I/usr/local/php/include/php/sapi/embed
# add includes to dist.
libphpembed_includes = php_arr.h php_cxx.h php_stl.h php_tok_consts.h php_tok.h
+lib_LTLIBRARIES = libphpembed.la
+libphpembed_la_SOURCES = php_cxx.cpp php_arr.cpp php_stl.cpp php_tok.cpp $(libphpembed_includes)
-lib_LIBRARIES = libphpembed.a
-libphpembed_a_SOURCES = php_cxx.cpp php_arr.cpp php_stl.cpp php_tok.cpp $(libphpembed_includes)
+# old style wihtout libtools
+#lib_LIBRARIES = libphpembed.a
+#libphpembed_a_SOURCES = php_cxx.cpp php_arr.cpp php_stl.cpp php_tok.cpp $(libphpembed_includes)

0 comments on commit ee0276b

Please sign in to comment.