diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/app_templates/cppsdlhello/configure.in | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/cppsdlhello/configure.in')
-rw-r--r-- | languages/cpp/app_templates/cppsdlhello/configure.in | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/cppsdlhello/configure.in b/languages/cpp/app_templates/cppsdlhello/configure.in new file mode 100644 index 00000000..440c2e44 --- /dev/null +++ b/languages/cpp/app_templates/cppsdlhello/configure.in @@ -0,0 +1,90 @@ +AC_INIT(configure.in) + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) + +AC_LANG_CPLUSPLUS +AC_PROG_CXX +AM_PROG_LIBTOOL + +dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, +dnl if-not-found, test-parameter) +AC_DEFUN(KDE_FIND_PATH, +[ + AC_MSG_CHECKING([for $1]) + if test -n "$$2"; then + kde_cv_path="$$2"; + else + kde_cache=`echo $1 | sed 'y%./+-%__p_%'` + + AC_CACHE_VAL(kde_cv_path_$kde_cache, + [ + kde_cv_path="NONE" + dirs="$3" + kde_save_IFS=$IFS + IFS=':' + for dir in $PATH; do + dirs="$dirs $dir" + done + IFS=$kde_save_IFS + + for dir in $dirs; do + if test -x "$dir/$1"; then + if test -n "$5" + then + evalstr="$dir/$1 $5 2>&1 " + if eval $evalstr; then + kde_cv_path="$dir/$1" + break + fi + else + kde_cv_path="$dir/$1" + break + fi + fi + done + + eval "kde_cv_path_$kde_cache=$kde_cv_path" + + ]) + + eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" + + fi + + if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then + AC_MSG_RESULT(not found) + $4 + else + AC_MSG_RESULT($kde_cv_path) + $2=$kde_cv_path + + fi +]) + +KDE_FIND_PATH(sdl-config, LIBSDL_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [ + AC_MSG_WARN([Could not find libsdl anywhere, check http://www.sdl.org]) +]) + +if test -n "$LIBSDL_CONFIG"; then + LIBSDL_LIBS="`$LIBSDL_CONFIG --libs`" + LIBSDL_RPATH= + for args in $LIBSDL_LIBS; do + case $args in + -L*) + LIBSDL_RPATH="$LIBSDL_RPATH $args" + ;; + esac + done + LIBSDL_RPATH=`echo $LIBSDL_RPATH | sed -e "s/-L/-R/g"` + LIBSDL_CFLAGS="`$LIBSDL_CONFIG --cflags`" + + AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1, [Defines if your system has the LIBSDL library]) +fi + + +AC_SUBST(LIBSDL_LIBS) +AC_SUBST(LIBSDL_CFLAGS) +AC_SUBST(LIBSDL_RPATH) + +AC_OUTPUT(Makefile src/Makefile) |