Commit befcaf07 authored by vysheng's avatar vysheng

Added --with-progname="progname" option to configure.

parent d520f28a
srcdir=.
CFLAGS=-g -O2 -I/usr/include/lua5.2
CFLAGS=-g -O2
LDFLAGS=
CPPFLAGS=
DEFS=-DHAVE_CONFIG_H
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
EXTRA_LIBS= -lreadline -lrt -lconfig -llua5.2 -ldl
LOCAL_LDFLAGS=-lm -lcrypto -lz -lssl -rdynamic -ggdb ${EXTRA_LIBS}
EXTRA_LIBS=-lconfig -lcrypto -lz -lrt -lm -lreadline -llua
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
HEADERS= ${srcdir}/constants.h ${srcdir}/include.h ${srcdir}/interface.h ${srcdir}/LICENSE.h ${srcdir}/loop.h ${srcdir}/mtproto-client.h ${srcdir}/mtproto-common.h ${srcdir}/net.h ${srcdir}/no-preview.h ${srcdir}/queries.h ${srcdir}/structures.h ${srcdir}/telegram.h ${srcdir}/tree.h ${srcdir}/config.h ${srcdir}/binlog.h ${srcdir}/tools.h ${srcdir}/lua-tg.h
......
......@@ -141,6 +141,9 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.1"
/* Use custom prog name */
/* #undef PROG_NAME */
/* Use libedit */
/* #undef READLINE_EDIT */
......
......@@ -140,6 +140,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Use custom prog name */
#undef PROG_NAME
/* Use libedit */
#undef READLINE_EDIT
......
......@@ -687,6 +687,7 @@ ac_user_opts='
enable_option_checking
enable_libconfig
enable_liblua
with_progname
'
ac_precious_vars='build_alias
host_alias
......@@ -1312,6 +1313,11 @@ Optional Features:
--enable-libconfig/--disable-libconfig
--enable-liblua/--disable-liblua
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-progname=<name>
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
......@@ -5363,6 +5369,35 @@ fi
fi
#check for custom prog name
# Check whether --with-progname was given.
if test "${with_progname+set}" = set; then :
withval=$with_progname;
if test "x$with_progname" = "xno" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
$as_echo "default" >&6; }
elif test "x$with_progname" = "xyes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
$as_echo "default" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$with_progname\"" >&5
$as_echo "\"$with_progname\"" >&6; }
cat >>confdefs.h <<_ACEOF
#define PROG_NAME "$with_progname"
_ACEOF
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
$as_echo "default" >&6; }
fi
# Checks for header files.
for ac_header in execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h
do :
......
......@@ -75,6 +75,21 @@ AC_ARG_ENABLE(liblua,[--enable-liblua/--disable-liblua],
AC_MSG_ERROR([No lua found. Try --disable-liblua])
])
])
#check for custom prog name
AC_ARG_WITH(progname,[--with-progname=<name>],
[
if test "x$with_progname" = "xno" ; then
AC_MSG_RESULT([default])
elif test "x$with_progname" = "xyes" ; then
AC_MSG_RESULT([default])
else
AC_MSG_RESULT(["$with_progname"])
AC_DEFINE_UNQUOTED([PROG_NAME], ["$with_progname"], [Use custom prog name])
fi
],[
AC_MSG_RESULT([default])
])
# Checks for header files.
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment