From: stephan b. <sg...@us...> - 2004-12-23 02:28:22
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20692 Modified Files: configure.pclasses2 Log Message: added kludge placeholders for the config.h vars Index: configure.pclasses2 =================================================================== RCS file: /cvsroot/pclasses/pclasses2/configure.pclasses2,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.pclasses2 23 Dec 2004 00:08:42 -0000 1.2 +++ configure.pclasses2 23 Dec 2004 02:28:13 -0000 1.3 @@ -2,7 +2,7 @@ #^^^ this helps emacs out, so it'll start in shell-script-mode # This is the configure script for the pclasses source tree. -toc_add_config PACKAGE_RELEASE_CODENAME="The Rewrite" +toc_export PACKAGE_RELEASE_CODENAME="The Rewrite" toc_test check_dist_md5s @@ -15,104 +15,159 @@ toc_test_require gnu_cpp_tools toc_test_require gcc_try_compile ${TOC_HOME}/tests/cpp/check_stl_newstyle.cpp test x1 = x${configure_enable_ccdv} && toc_test use_ccdv - -####### docs: -toc_find lyx ${configure_with_lyx%/*}:$PATH && toc_export LYX_BIN=${TOC_FIND_RESULT} - - ############################################################ # accumulate -I and -L/-l entries here: -includes_path= -ldadd= +# Reminder: these are the flags for linking +inc="${INCLUDES}" +ldadd="${LDADD}" ############################################################ +toc_test libltdl || toc_test_require libdl # prefer ltdl, else allow dl. + + ############################################################ # supplemental libs -{ - for i in mysql_clients; do - toc_test $i - done -} - +toc_test mysql_config +toc_test pg_config # toc_test libexpat # && ldadd="${ldadd} -lexpat" +######################################################################## +# pthreads kludge... use_pthread=0 toc_test gcc_try_compile ${TOC_HOME}/tests/c/check_for_pthread.c && { use_pthread=1 - cli_ldadd="${cli_ldadd} -lpthread" + THREADS_LDADD="-lpthread" + THREADS_INCLUDES="" # i hope it's in a system default path! } -toc_export eshell_HAVE_PTHREAD=${use_pthread} -unset use_pthread -if test x0 = "x${use_pthread}" ; then - toc_die 127 "The tree currently needs pthreads. To be fixed." +if test x0 = "x${pclasses2_HAVE_PTHREAD}" ; then + toc_die 127 "The build tree currently needs pthreads. To be fixed." fi - +unset use_pthread +# /pthread +######################################################################## ######################################################################## -# TODO: -# figure out the list of -lLIBS for clients to link against, based -# on what modules we will build! -removeDupes=${TOC_HOME}/bin/removeDupeArgs -CLIENT_LDADD="$(${removeDupes} -L${prefix}/lib -lpclasses2)" -CLIENT_INCLUDES="$(${removeDupes} -I${prefix}/include)" +{ # huge_kludges: +cat <<EOF > /dev/null +the following defs needs to be ported to toc: +PTHREAD_CREATE_JOINABLE +STDC_HEADERS +WITH_STL +WORDS_BIGENDIAN +_FILE_OFFSET_BITS +_LARGE_FILES +_MINIX +_POSIX_1_SOURCE +_POSIX_SOURCE +EOF -#{ # generate PACKAGE_NAME-config: -# export ldadd -# export includes_path -# toc_test_require PACKAGE_NAME-config -# PACKAGE_PREFIX="${PACKAGE_NAME}_" -# CLIENT_LDADD="${CLIENT_LDADD}" -# CLIENT_INCLUDES="${CLIENT_INCLUDES})" +force=" +HAVE_LARGEFILE=1 +HAVE_DLFCN_H=1 +HAVE_DLOPEN=1 +HAVE_DYLD=1 +HAVE_FUNC_GETSERVBYNAME_R_4=0 +HAVE_FUNC_GETSERVBYNAME_R_5=0 +HAVE_FUNC_GETSERVBYNAME_R_6=0 +HAVE_GETPAGESIZE=1 +HAVE_INTTYPES_H=1 +HAVE_LIBRT=1 +HAVE_LONG_DOUBLE=1 +HAVE_MEMORY_H=1 +HAVE_MMAP=1 +HAVE_PTHREAD=1 +HAVE_PTHREAD_GET_EXPIRATION_NP=1 +HAVE_PTHREAD_MUTEXATTR_SETPSHARED=1 +HAVE_PTHREAD_MUTEX_TIMEDLOCK=1 +HAVE_PTHREAD_MUTEX_TIMED_NP=1 +HAVE_PTHREAD_RWLOCK_TIMEDLOCK=1 +HAVE_PTHREAD_YIELD=1 +HAVE_PTHREAD_CREATE_JOINABLE=1 +HAVE_SHL_LOAD=1 +HAVE_SHM_OPEN=1 +HAVE_STDINT_H=1 +HAVE_STDLIB_H=1 +HAVE_STRINGS_H=1 +HAVE_STRING_H=1 +HAVE_SYSV_IPC=1 +HAVE_SYS_STAT_H=1 +HAVE_SYS_TYPES_H=1 +HAVE_UNISTD_H=1 +SIZEOF___INT64=64 +WITH_STL=${configure_with_stl-1} +" - # import the PACKAGE_NAME-config info to ease life for us later on... -# eval $(./${PACKAGE_NAME}-config --toc-config | sed -e 's/$/; /') + for i in ${force}; do + toc_export PCLASSES_${i%%=*}=${i##*=} + done - # echo -e "ldadd=${ldadd}\nLIBS11N_LDADD=${LIBS11N_LDADD}\nLIBS11N_CLIENT_LDADD=${LIBS11N_CLIENT_LDADD}" -# unset includes_path -# unset ldadd -#} + ${CC} -o sizes toc/tests/cpp/type_sizes.cpp -lstdc++ &>/dev/null || { + toc_die $? "Error getting system's type sizes!" + } + for kvp in $(./sizes PCLASSES); do + toc_export ${kvp%%=*}=${kvp##*=} + done + rm sizes +} # /huge_kludges +######################################################################## -#PACKAGE_CFLAGS="${PCLASSES2_CLIENT_INCLUDES}" -# PACKAGE_LDADD="${PCLASSES2_CLIENT_LDADD}" -# toc_test_require create_pkg-config_data +###### stuff: +toc_find lyx ${configure_with_lyx%/*}:$PATH \ + && toc_export LYX_BIN=${TOC_FIND_RESULT} # for (future) lib manual +toc_export BUILD_USER="$USER" +toc_export BUILD_HOST=$(hostname) +toc_export PACKAGE_EMAIL_ADDRESS=pcl...@li... +toc_export PACKAGE_URL=http://pclasses.com +toc_export PACKAGE_LICENSE="GNU LGPL" -###### stuff: -toc_add_config BUILD_USER="$USER" -toc_add_config BUILD_HOST=`hostname` -toc_add_config PACKAGE_EMAIL_ADDRESS=pcl...@li... -toc_add_config PACKAGE_URL=http://pclasses.com -toc_add_config PACKAGE_LICENSE="GNU LGPL" +CLIENT_LDADD="-L${prefix}/lib -lpcore" +CLIENT_INCLUDES="-I${prefix}/include" +removeDupes=${TOC_HOME}/bin/removeDupeArgs +# These are the libs the core lib The libs +toc_export LIBPCORE_LDADD="$(${removeDupes} ${ldadd})" +toc_export LIBPCORE_INCLUDES="$(${removeDupes} ${inc})" +toc_export LIBPSYSTEM_LDADD="$(${removeDupes} ${THREADS_LDADD})" +toc_export LIBPSYSTEM_INCLUDES="$(${removeDupes} ${THREADS_INCLUDES})" -toc_test_require atfilter_file include/pclasses/pclasses_config.h.at include/pclasses/pclasses_config.h +toc_export LIBPSQL_MYSQL_LDADD="$(${removeDupes} ${ldadd} ${MYSQL_LDADD})" +toc_export LIBPSQL_MYSQL_INCLUDES="$(${removeDupes} ${inc} ${MYSQL_INCLUDES})" +toc_export LIBPSQL_POSTSQL_LDADD="$(${removeDupes} ${ldadd} ${POSTGRES_LDADD})" +toc_export LIBPSQL_POSTSQL_INCLUDES="$(${removeDupes} ${inc} ${POSTGRES_INCLUDES})" -toc_boldecho "======================= Creating Makefiles..." +######################################################################## +# Anything below this line should not modify the config: we are +# now exporting our files... +######################################################################## +######################################################################## +toc_boldecho "======================= Creating Makefiles..." make_out=${PWD}/.toc.Makefile { - cat <<EOF -#!/usr/bin/make -f -# Automatically generated by configure. -# Do not edit this file: put your code in Makefile.toc. -include Makefile.toc -DIST_FILES += Makefile.toc -DIST_FILES := \$(filter-out Makefile,\$(DIST_FILES)) -# ^^^^ toc automatically adds Makefile to DIST_FILES. -DISTCLEAN_FILES += Makefile -# ^^^^ todo + # ACHTUNG: note use of HARD TABS in the following cat: + cat <<-EOF + #!/usr/bin/make -f + # Automatically generated by configure on $(date). + # Do not edit this file: put your code in Makefile.toc. + include Makefile.toc + DIST_FILES += Makefile.toc + DIST_FILES := \$(filter-out Makefile,\$(DIST_FILES)) + # ^^^^ toc automatically adds Makefile to DIST_FILES. + DISTCLEAN_FILES += Makefile + # ^^^^ todo EOF } > $make_out +#### Make Makefiles for m in $(find . -type f -name Makefile.toc | sort); do nm=${m%%.toc} echo -en "\t\t$nm ... " cmp $make_out $nm &>/dev/null && { echo -e "\r${TOC_EMOTICON_OKAY} up to date" -smile="" continue } cp $make_out $nm || toc_die 1 "Could not write $nm!" @@ -120,8 +175,13 @@ done rm $make_out toc_boldecho "======================= ${TOC_EMOTICON_OKAY} Created Makefiles." -return 0 +######################################################################## + +toc_test_require atfilter_file \ + include/pclasses/pclasses-config.h.at \ + include/pclasses/pclasses-config.h ##### close the config-filtered files: toc_test_require toc_project_makefile # ^^^^ this must come last. +return 0 |