remove automake residuals

This commit is contained in:
Juergen E. Fischer 2014-07-20 15:11:08 +02:00
parent ed21cdbd5a
commit fd0ad491a5
2 changed files with 0 additions and 251 deletions

View File

@ -1,150 +0,0 @@
/***************************************************************************
qgis_config.cpp
Display information about the installed version of QGIS.
This information can be used to configure applications that use
the QGIS library.
begin : 2004-03-22
copyright : (C) 2004 by Gary Sherman
email : sherman at mrcc.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <iostream>
#include <getopt.h>
/**
* Show usage of qgis_config when user supplies --help or -h as an argument
*/
void usage()
{
std::cout <<
"qgis_config provides information about the installed version of QGIS.\n\n" <<
"Usage:\n " <<
" qgis_config OPTION...\n\n" <<
"Options:\n" <<
" --prefix print the prefix used by qgis\n" <<
" --bindir print destination of executable(s)\n" <<
" --cflags print the compiler flags that are necessary to\n" <<
" compile a plug-inshow location of C++ header files\n" <<
" --libs print the linker flags that are necessary to link a\n" <<
" plug-in\n" <<
" --plugindir print the path where the plugins are installed\n" <<
" --major_version print major version of qgis\n" <<
" --minor_version print minor version of qgis\n" <<
" --micro_version print micro version of qgis\n" <<
" --extra_version print extra version of qgis\n" <<
" --help show this help, then exit\n"
<< std::endl;
}
/**
* Main function to display various information about the configured
* and installed version of QGIS. This information is based on parameters
* supplied when configuring QGIS prior to building.
*/
int main(int argc, char **argv)
{
int optionChar;
// options structure
static struct option long_options[] =
{
/* These options set a flag. */
{"help", no_argument, 0, 'h'},
/* These options don't set a flag.
* We distinguish them by their indices. */
{"prefix", no_argument, 0, 'p'},
{"bindir", no_argument, 0, 'b'},
{"cflags", no_argument, 0, 'c'},
{"libs", no_argument, 0, 'l'},
{"plugindir", no_argument, 0, 'w'},
{"major_version", no_argument, 0, '1'},
{"minor_version", no_argument, 0, '2'},
{"micro_version", no_argument, 0, '3'},
{"extra_version", no_argument, 0, '4'},
{0, 0, 0, 0}
};
// If no argument is given, show hint
if(argc == 1)
{
std::cout << "qgis_config: argument required\n"
<< "Try \"qgis_config --help\" for more information.\n";
}else
{
// One or more arguments supplied
while (1)
{
/* getopt_long stores the option index here. */
int option_index = 0;
optionChar = getopt_long (argc, argv, "pbclw",
long_options, &option_index);
/* Detect the end of the options. */
if (optionChar == -1)
break;
switch (optionChar)
{
case 'p':
std::cout << PREFIX << '\n';
break;
case 'b':
std::cout << BIN_DIR << '\n';
break;
case 'c':
std::cout << "-I" << INCLUDE_DIR << " "
<< "-I" << INCLUDE_DIR << "/qgis\n";
break;
case 'l':
std::cout << "-L" << LIB_DIR
<< " -lqgis_core -lqgis_gui -lqgis_composer"
<< " -lqgisgrass -lqgis_legend -lqgis_raster\n";
break;
case 'w':
std::cout << PLUGIN_DIR << '\n';
break;
case '1':
std::cout << MAJOR_VERSION << '\n';
break;
case '2':
std::cout << MINOR_VERSION << '\n';
break;
case '3':
std::cout << MICRO_VERSION << '\n';
break;
case '4':
std::cout << EXTRA_VERSION << '\n';
break;
case 'h':
usage();
return 1;
break;
default:
std::cout << "Try \"qgis_config --help\" for more information.\n";
return 1;
}
}
}
// return success
return 0;
}

View File

@ -1,101 +0,0 @@
dnl ------------------------------------------------------------------------
dnl Detect QGIS
dnl
dnl use AQ_CHECK_QGIS to detect QGIS
dnl it sets:
dnl QGIS_CXXFLAGS
dnl QGIS_LDADD
dnl ------------------------------------------------------------------------
# Check for QGIS compiler and linker flags
# Jens Oberender <j.obi@troja.net> 2004
AC_DEFUN([AQ_CHECK_QGIS],
[
dnl
dnl Get the cflags and libraries from qgis-config
dnl
AC_ARG_WITH([qgis],
AC_HELP_STRING([--with-qgis=path],
[Full path to 'qgis-config', e.g. --with-qgis=/usr/local/bin/qgis-config]),
[ac_qgis_config_path=$withval])
if test x"$ac_qgis_config_path" = x ; then
ac_qgis_config_path=`which qgis-config`
fi
ac_qgis_config_path=`dirname $ac_qgis_config_path 2> /dev/null`
AC_PATH_PROG(QGIS_CONFIG, qgis-config, no, $ac_qgis_config_path)
if test x"$QGIS_CONFIG" = xno ; then
if test x"$ac_qgis_config_path" = x ; then
AC_MSG_ERROR([qgis-config not found in $ac_qgis_config_path! Supply a path with --with-qgis=PATH])
else
AC_MSG_ERROR([qgis-config not found! Supply a path with --with-qgis=PATH])
fi
else
AC_MSG_CHECKING([QGIS_CXXFLAGS])
QGIS_CXXFLAGS=`$QGIS_CONFIG --cflags`
AC_MSG_RESULT($QGIS_CXXFLAGS)
AC_MSG_CHECKING([QGIS_LDADD])
QGIS_LDADD=`$QGIS_CONFIG --libs`
AC_MSG_RESULT($QGIS_LDADD)
AC_MSG_CHECKING([QGIS_PREFIX])
QGIS_PREFIX=`$QGIS_CONFIG --prefix`
AC_MSG_RESULT($QGIS_PREFIX)
AC_MSG_CHECKING([QGIS_PLUGINPATH])
QGIS_PLUGINPATH=`$QGIS_CONFIG --plugindir`
AC_MSG_RESULT($QGIS_PLUGINPATH)
AC_MSG_CHECKING([QGIS_MAJOR_VERSION])
QGIS_MAJOR_VERSION=`$QGIS_CONFIG --major_version`
AC_MSG_RESULT($QGIS_MAJOR_VERSION)
AC_MSG_CHECKING([QGIS_MINOR_VERSION])
QGIS_MINOR_VERSION=`$QGIS_CONFIG --minor_version`
AC_MSG_RESULT($QGIS_MINOR_VERSION)
AC_MSG_CHECKING([QGIS_MICRO_VERSION])
QGIS_MICRO_VERSION=`$QGIS_CONFIG --micro_version`
AC_MSG_RESULT($QGIS_MICRO_VERSION)
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
CXXFLAGS="$CXXFLAGS $QGIS_CXXFLAGS $QT_CXXFLAGS"
LDFLAGS="$LDFLAGS $QGIS_LDADD $QT_LDADD $GDAL_LDADD"
case "${host}" in
*darwin*)
LDFLAGS="$LDFALGS -flat_namespace -undefined suppress"
;;
esac
AC_LINK_IFELSE([
#include <qgsfeature.h>
int main(int argc, char *argv[]) {
QgsFeature * myQgsFeature = new QgsFeature(1);
return 0;
}
], [ac_qgis_linked='yes'], [ac_qgis_linked='no'])
CXXFLAGS="$ac_save_CXXFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
AC_MSG_CHECKING([if linking with QGIS works])
if test x$ac_qgis_linked = xyes ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
AC_SUBST(QGIS_CXXFLAGS)
AC_SUBST(QGIS_LDADD)
AC_SUBST(QGIS_PREFIX)
AC_SUBST(QGIS_PLUGINPATH)
AC_SUBST(QGIS_MAJOR_VERSION)
AC_SUBST(QGIS_MINOR_VERSION)
AC_SUBST(QGIS_MICRO_VERSION)
])