Skip to content
Browse files

add make install

  • Loading branch information...
1 parent 8232e50 commit dcd4a02c1d437a8e5467e3e71279b49542dbb1dd @weyrick committed
Showing with 244 additions and 1,751 deletions.
  1. +27 −9 Makefile → Makefile.in
  2. +16 −0 acinclude.m4
  3. +80 −1,720 configure
  4. +29 −22 configure.in
  5. +92 −0 doc/pcc.conf.in
  6. 0 doc/{pcc.conf → pcc.conf.sample}
View
36 Makefile → Makefile.in
@@ -18,8 +18,7 @@
# check - run main test suite, using dotest program
# check5 - run PHP5 specific test suite
# check-all - run main test suite, and all extension test suites
-#
-# ** there is no 'install' target yet!! **
+# install - install libraries and binaries
#
PCC_ROOT = .
include bigloo-rules.mk
@@ -28,9 +27,11 @@ PWD = `pwd`
VERBOSE =
BIGLOO = bigloo
-# paths needed for the install script
-INSTALL_ROOT = /
-INSTALL_PREFIX = /usr/
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+sysconfdir = @sysconfdir@
all: Makefile.config libs libs/libwebserver.$(SOEXT) profiler runtime webconnect \
compiler extensions web-backends debugger shortpath dotest
@@ -125,10 +126,27 @@ docs:
(cd doc && $(MAKE))
install:
- @echo "sorry, there is no 'make install' right now - you should run pcc from the source directory"
- @echo "the binary is located at compiler/pcc - you should put the compiler/ directory into your PATH"
- @echo "you also need bigloo and other items in your path: see the wiki online at http://code.roadsend.com/"
-
+#config
+ install -m 755 -d $(sysconfdir)
+ install -m 644 -b ./doc/pcc.conf $(sysconfdir)/pcc.conf
+#binaries
+ install -m 755 -d $(bindir)
+ install -m 755 ./compiler/pcc $(bindir)/pcc
+ install -m 755 ./compiler/pdb $(bindir)/pdb
+ install -m 755 ./compiler/pcctags $(bindir)/pcctags
+ install -m 755 ./webconnect/fastcgi/pcc.fcgi $(bindir)/pcc.fcgi
+#libraries
+ install -m 755 -d $(libdir)
+ install -m 644 ./libs/libwebserver.so $(libdir)
+ install -m 644 ./libs/libwebserver.a $(libdir)
+ install -m 644 ./libs/*_[su]*.so $(libdir)
+ install -m 644 ./libs/*_[su]*.a $(libdir)
+ install -m 644 ./libs/*.sch $(libdir)
+ install -m 644 ./libs/*.h $(libdir)
+ install -m 644 ./libs/*.heap $(libdir)
+ install -m 644 ./libs/*.init $(libdir)
+
+# used by the self installing package maker
package-install: unsafe
./install.sh $(INSTALL_ROOT) $(INSTALL_PREFIX)
View
16 acinclude.m4
@@ -203,3 +203,19 @@ AC_DEFUN([AX_LIB_SQLITE3],
fi
])
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
+
View
1,800 configure
80 additions, 1,720 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
51 configure.in
@@ -245,24 +245,24 @@ AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STAT
-AC_C_CONST
-AC_TYPE_UID_T
-AC_TYPE_MODE_T
-AC_TYPE_PID_T
-AC_C_RESTRICT
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-AC_CHECK_TYPES([ptrdiff_t])
+#AC_HEADER_STAT
+#AC_C_CONST
+#AC_TYPE_UID_T
+#AC_TYPE_MODE_T
+#AC_TYPE_PID_T
+#AC_C_RESTRICT
+#AC_TYPE_SIZE_T
+#AC_HEADER_TIME
+#AC_STRUCT_TM
+#AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_REALLOC
-AC_FUNC_SELECT_ARGTYPES
-AC_FUNC_STAT
-AC_CHECK_FUNCS([gethostbyname inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
+#AC_FUNC_MALLOC
+#AC_FUNC_MEMCMP
+#AC_FUNC_REALLOC
+#AC_FUNC_SELECT_ARGTYPES
+#AC_FUNC_STAT
+#AC_CHECK_FUNCS([gethostbyname inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol])
# Substitutions
AC_SUBST(PCC_OS, $PCC_OS)
@@ -282,16 +282,27 @@ AC_SUBST(XML_CFLAGS, $XML_CFLAGS)
AC_SUBST(XML_LIBS, $XML_LIBS)
AC_SUBST(PCRE_CFLAGS, $PCRE_CFLAGS)
AC_SUBST(PCRE_LIBS, $PCRE_LIBS)
+
+AC_SUBST(prefix, $prefix)
+AC_SUBST(exec_prefix, $exec_prefix)
+AC_SUBST(libdir, $libdir)
+AC_SUBST(bindir, $bindir)
+AC_SUBST(sysconfdir, $sysconfdir)
+
+AC_DEFINE_DIR(CONF_HOME, sysconfdir, [pcc conf home])
+AC_DEFINE_DIR(PCC_LIBS, libdir, [pcc lib dir])
+
# need PCRE_STATIC_CLAGS?
# gtk missing
#AC_SUBST(_CFLAGS, $_CFLAGS)
#AC_SUBST(_LIBS, $_LIBS)
AC_CONFIG_FILES([Makefile.config])
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([doc/pcc.conf])
#AC_CONFIG_SUBDIRS([tools/libwebserver])
AC_OUTPUT
-
dnl ==========================================================================
echo "
Roadsend PHP Configuration Summary
@@ -302,6 +313,7 @@ echo "
prefix: ${prefix}
libdir: ${libdir}
bindir: ${bindir}
+ sysconfir: ${sysconfdir}
mandir: ${mandir}
source code location: ${srcdir}
@@ -330,8 +342,3 @@ echo "
"
-echo "
-BETA NOTICE:
-This configuration system is beta. You should check Makefile.config
-for accuracy.
-"
View
92 doc/pcc.conf.in
@@ -0,0 +1,92 @@
+; Roadsend PCC Configuration File
+;;
+;; lines starting with a semi-colon are considered comments
+;;
+
+;; DIRECTIVE: home
+(home "@CONF_HOME@")
+
+;; DIRECTIVE: include
+; Include directives add directories to the include file search path
+(include "./")
+
+; example of multiple paths
+;(include "./" "/usr/local/lib/php/")
+
+;; DIRECTIVE: library
+; Library directives add directories to the dynamic-load search path.
+(library "./" "@PCC_LIBS@")
+
+; this example shows how to list your own library directory
+; NOTE you might also have to put this directory in /etc/ld.so.conf to
+; get installed libraries to work!
+;(library "./" "/usr/local/pcclibs/")
+
+;; DIRECTIVE: default-commandline-lib
+; these are the extensions to laod by default
+; if are receiving an error about an extension that does not load,
+; remove it from this list
+
+; the default enables all extensions
+(default-commandline-lib php-std php-pcre php-xml php-mysql php-curl)
+
+;; DIRECTIVE: web-libs
+; these libraries will be loaded by the web modules and
+; the interpreter before the script is run
+
+; the default enables all extensions
+(web-libs php-std php-pcre php-xml php-mysql php-curl)
+
+; this is minimal. you need at least php-std
+;(web-libs php-std)
+
+; this directive also loads custom libraries (like those generated by php -l)
+;(web-libs testlib)
+
+;; DIRECTIVE: ini
+; this directive sets PHP ini flags
+
+; this is an ini entry to tell the mysql lib where the socket is
+;(ini
+; (mysql.default_socket "/var/run/mysqld/mysqld.sock"))
+
+; odbc max links option. -1 is unlimited
+;(ini
+; (odbc.max_links -1))
+
+; session configuration
+(ini
+ (session.cookie_lifetime 0)
+ (session.cookie_path "/")
+ (session.cookie_domain "")
+ (session.cookie_secure #f)
+ (session.save_path "/tmp")
+ (session.name "PHPSESSID")
+ (session.auto_start 0)
+ (session.use_cookies 1)
+ (session.use_only_cookies 0)
+ (session.referer_check "")
+ (session.cache_limiter "nocache")
+ (session.cache_expire 180)
+ (session.use_trans_id 0)
+ (url_rewriter.tags "a=href,area=href,frame=src,input=src,form=fakeentry")
+ (session.gc_probability 1)
+ (session.gc_divisor 100)
+ (session.gc_maxlifetime 1440))
+
+; file uploads
+(ini
+ (file_uploads 1)
+ ; leave this unset for the system default
+ ;(upload_tmp_dir "/tmp")
+ ; note this is specified in bytes
+ (upload_max_filesize 2048000))
+
+;; DIRECTIVE: debug-level
+; a level of 0 will turn off all debugging messages.
+; set to 1 or 2 to receive verbose errors and warnings while
+; compiling and running
+
+; debug level
+(debug-level 0)
+
View
0 doc/pcc.conf → doc/pcc.conf.sample
File renamed without changes.

0 comments on commit dcd4a02

Please sign in to comment.
Something went wrong with that request. Please try again.