#!/bin/sh # # Jakelib2 - General purpose C++ library # Copyright (C) 2001 Florian Wolff (florian@donuz.de) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: jakelib2-skeleton.in,v 1.12 2003/08/18 14:46:44 florian Exp $ # prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no CC="@CC@" CXX="@CXX@" LD="@SHARED_LD@" JAKELIB2_CONFIG_PARAMS="" cross_compiling=@cross_compiling@ target=@host_alias@ datadir=@datadir@ sysconfdir=@sysconfdir@ sharedstatedir=@sharedstatedir@ localstatedir=@localstatedir@ libdir=@libdir@ infodir=@infodir@ mandir=@mandir@ includedir=@includedir@ oldincludedir=/usr/include pkgdatadir=$datadir/@PACKAGE@ pkglibdir=$libdir/@PACKAGE@ pkgincludedir=$includedir/@PACKAGE@ usage() { cat < [--force] EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --force) FORCE=1 ;; *) if test -z "$PROJECTNAME"; then PROJECTNAME=$1 else usage 1 1>&2 exit 1 fi ;; esac shift done # # Check if project name is specified: # if test -z "$PROJECTNAME"; then usage 1 1>&2 exit 1; fi # # Check if directory is empty or '--force' is applied: # if test "`echo *`" != "*"; then if test -z "$FORCE"; then echo "The current working directory is not empty." echo "If you really want to create the new project here," echo "You should apply the '--force' option." exit 2 fi fi echo echo "Creating new skeleton for project '${PROJECTNAME}':" # # Everything's ok, start copying: # mkdir -p src && echo "OK: src directory created" cp $pkgdatadir/template/COPYING \ . && \ cp $pkgdatadir/template/Main.jlc $pkgdatadir/template/Sub.jlc \ src && echo "OK: Template files copied" touch INSTALL NEWS README AUTHORS ChangeLog && echo "OK: Empty text files created" # # Write Makefile.am # cat > Makefile.am < src/Makefile.am < configure.in < dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public dnl License as published by the Free Software Foundation; either dnl version 2.1 of the License, or (at your option) any later version. dnl dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Lesser General Public License for more details. dnl dnl You should have received a copy of the GNU Lesser General Public dnl License along with this library; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl dnl ---------------------------------------------------------------------- AC_INIT(configure.in) AM_INIT_AUTOMAKE(${PROJECTNAME}, 0.0.0) AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_CHECK_JAKELIB2(@VERSION@, , AC_MSG_ERROR(Cannot find Jakelib2)) AC_OUTPUT([ Makefile src/Makefile ]) EOF aclocal && echo "OK: aclocal" autoconf && echo "OK: autoconf" automake --add-missing 2>/dev/null && echo "OK: automake" ./configure >/dev/null && echo "OK: configure"